Skip to content
Snippets Groups Projects
Commit 5814bcd5 authored by Guy Jacob's avatar Guy Jacob
Browse files

Update PostTrainQuantizer initialization sample in docs (add htmls)

parent 2697a18f
No related branches found
No related tags found
No related merge requests found
......@@ -273,5 +273,5 @@ And of course, if we used a sparse or compressed representation, then we are red
<!--
MkDocs version : 1.0.4
Build Date UTC : 2019-05-19 07:50:55
Build Date UTC : 2019-05-19 08:14:18
-->
......@@ -559,14 +559,7 @@ args = parser.parse_args()
<p>(Note that <code>--quantize-eval</code> and <code>--qe-calibration</code> are mutually exclusive.)</p>
<p>When using these command line arguments, the quantizer can be invoked as follows:</p>
<pre><code class="python">if args.quantize_eval:
if args.qe_config_file:
quantizer = distiller.config_component_from_file_by_class(model, args.qe_config_file,
'PostTrainLinearQuantizer')
else:
quantizer = quantization.PostTrainLinearQuantizer(model, args.qe_bits_acts, args.qe_bits_wts,
args.qe_bits_accum, None, args.qe_mode, args.qe_clip_acts,
args.qe_no_clip_layers, args.qe_per_channel,
args.qe_stats_file)
quantizer = distiller.quantization.PostTrainLinearQuantizer.from_args(model, args)
quantizer.prepare_model()
# Execute evaluation on model as usual
</code></pre>
......
This diff is collapsed.
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment