Skip to content

Commit fd27002

Browse files
mapetrendrego
authored andcommitted
Removed formatting changes
1 parent 93ed57f commit fd27002

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

onnxruntime/python/tools/quantization/operators/convtranspose2d.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,7 @@ def quantize(self):
9898
if node.output[0] in self.quantizer.value_infos:
9999
op_shape = self.quantizer.value_infos[node.output[0]].type.tensor_type.shape.dim
100100
op_shape = [it.dim_value for it in op_shape]
101-
self.quantizer.model.graph().value_info.extend(
102-
[onnx.helper.make_tensor_value_info(qlinear_conv_node.output[0], onnx.TensorProto.INT8, shape=op_shape)]
103-
)
101+
self.quantizer.model.graph().value_info.extend([onnx.helper.make_tensor_value_info(qlinear_conv_node.output[0], onnx.TensorProto.INT8, shape=op_shape)])
104102

105103
nodes.append(qlinear_conv_node)
106104

onnxruntime/python/tools/quantization/operators/direct_q8.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ def quantize(self):
3737
# Force quantize those ops if possible, use exclude node list if this is not you want
3838
# TODO: this check seems overly restrictive, for now add an exception to allow MaxPool
3939
# forced quantization but invesigate full removing the check
40-
if not self.quantizer.is_valid_quantize_weight(node.input[0]) and node.op_type != "MaxPool":
40+
if not self.quantizer.is_valid_quantize_weight(node.input[0]) and\
41+
node.op_type != 'MaxPool':
4142
super().quantize()
4243
return
4344

0 commit comments

Comments
 (0)