Skip to content

Commit 816b3b3

Browse files
committed
[NNCF] Experimental tensorflow backend: Replace (openvinotoolkit#3249)
Changes: Call to following class method in nncf/common/graph/layer_attributes.py was replaced with call to its corresponding self-contained legacy function in nncf/common/graph/utils.py: - layer_attributes.get_weight_shape -> get_weight_shape_legacy(layer_attributes: WeightedLayerAttributes) Location in /nncf/experimental/tensorflow/quantization/ folder - algorithm.py Reason for changes: (openvinotoolkit#3249) Torch and Tensorflow backend-specific methods need to be removed from common layer attributes and all related calls need to be replaced by their corresponding legacy function calls
1 parent b37408f commit 816b3b3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nncf/experimental/tensorflow/quantization/algorithm.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from nncf.common.graph.transformations.commands import TargetType
1919
from nncf.common.graph.transformations.commands import TransformationPriority
2020
from nncf.common.graph.utils import get_first_nodes_of_type
21+
from nncf.common.graph.utils import get_weight_shape_legacy
2122
from nncf.common.logging import nncf_logger
2223
from nncf.common.quantization.quantizer_setup import ActivationQuantizationInsertionPoint
2324
from nncf.common.quantization.quantizer_setup import QuantizationPointId
@@ -133,7 +134,7 @@ def _get_tensor_specs(
133134
assert len(metatype.weight_definitions) == 1
134135

135136
channel_axes = metatype.weight_definitions[0].channel_axes
136-
weight_shape = node.layer_attributes.get_weight_shape()
137+
weight_shape = get_weight_shape_legacy(node.layer_attributes)
137138
tensor_specs.append((weight_shape, channel_axes))
138139
else:
139140
data_format = node.layer_attributes.get_data_format()

0 commit comments

Comments
 (0)