Code clean and remove useless space.
@@ -45,7 +45,7 @@ class TensorFlowAdaptor(Adaptor):
Returns:
tensor: evaluation result, the larger is better.
"""
- for i in range(0, try_cnt):
+ for _ in range(try_cnt):
try:
return graph.get_tensor_by_name(name)
except:
@@ -148,8 +148,10 @@ class TensorFlowAdaptor(Adaptor):
if node.op.find("Sum") != -1:
out_min = -5
out_max = -4
- q_out_min = graph_info[node.input[out_min]].node.attr["value"].tensor.float_val[0]
- q_out_max = graph_info[node.input[out_max]].node.attr["value"].tensor.float_val[0]
+ q_out_min = graph_info[node.input[out_min]
+ ].node.attr["value"].tensor.float_val[0]
+ q_out_max = graph_info[node.input[out_max]
+ ].node.attr["value"].tensor.float_val[0]
q_node_scale[node.name] = (node.op, q_out_min, q_out_max)
int8_inspect_node_name.append(node.name)
# Inspect weights, bias. Need further optimize
