File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
neural_compressor/adaptor/tf_utils/graph_rewriter/int8 Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -263,10 +263,14 @@ def do_transformation(self):
263263
264264 weight_node = self .graph_info [new_node .input [1 ]].node
265265 bias_node = self .graph_info [new_node .input [2 ]].node
266- max_input_node = self .graph_info [last_node .input [- 1 ]].node
267- min_input_node = self .graph_info [last_node .input [- 2 ]].node
268266
269- if max_input_node .op == "Enter" : # pragma: no cover
267+ max_input_node = None
268+ min_input_node = None
269+ if last_node .op .find ("Requantize" ) != - 1 or last_node .op .find ("QuantizeV2" ) != - 1 :
270+ max_input_node = self .graph_info [last_node .input [- 1 ]].node
271+ min_input_node = self .graph_info [last_node .input [- 2 ]].node
272+
273+ if max_input_node and max_input_node .op == "Enter" : # pragma: no cover
270274 min_input_parent_name = Helper .node_name_from_input (min_input_node .input [0 ])
271275 max_input_parent_name = Helper .node_name_from_input (max_input_node .input [0 ])
272276 min_input_parent_node = self .graph_info [min_input_parent_name ].node
You can’t perform that action at this time.
0 commit comments