Skip to content

Commit

Permalink
Add --disable_per_channel_quantize option
Browse files Browse the repository at this point in the history
  • Loading branch information
take-cheeze committed Aug 27, 2019
1 parent 9fa16b6 commit eeb6612
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions compiler/passes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ void RunDefaultPasses(Graph* graph, bool gen_backprop, bool skip_scheduling) {

if (g_quantize) {
QuantizationOptions q_opts;
q_opts.per_channel = !g_disable_per_channel_quantize;
Recursively([q_opts](Graph* graph) { Quantize(q_opts, graph); }, graph);
}

Expand Down
4 changes: 4 additions & 0 deletions scripts/generate_flags_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@
'type': 'bool',
'doc': 'Quantize ONNX model'
},
'disable_per_channel_quantize': {
'type': 'bool',
'doc': 'Disables per channel quantization'
},

'computation_order': {
'type': 'std::string',
Expand Down

0 comments on commit eeb6612

Please sign in to comment.