Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update default values for weight quatization #1564

Merged
merged 1 commit into from
Aug 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion onnxruntime/python/tools/quantization/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ onnx.save(quantized_model, 'path/to/the/quantized_model.onnx')
See below for a description of all the options to quantize():

- **model**: ModelProto to quantize
- **per_channel**: *default: True*
- **per_channel**: *default: False*
If True, weights of Conv nodes are quantized per output channel.
If False, they are quantized per tensor. Refer [QLinearConv](https://github.com/onnx/onnx/blob/master/docs/Operators.md#qlinearconv) for more information.
- **nbits**: *default: 8*
Expand Down
2 changes: 1 addition & 1 deletion onnxruntime/python/tools/quantization/quantize.py
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ def _quantize_matmul(self, node, new_nodes_list):
return [node]


def quantize(model, per_channel=True, nbits=8, quantization_mode=QuantizationMode.IntegerOps,
def quantize(model, per_channel=False, nbits=8, quantization_mode=QuantizationMode.IntegerOps,
static=False, asymmetric_input_types=False, input_quantization_params=None, output_quantization_params=None):
'''
Given an onnx model, create a quantized onnx model and save it into a file
Expand Down