From 06f2b06589344e7b646724c751c0eb9281db9d9b Mon Sep 17 00:00:00 2001 From: Yi-Syuan Chen <chenys1995@gmail.com> Date: Fri, 21 Sep 2018 15:36:34 +0800 Subject: [PATCH] Bugfix: Conflicting argument names when resuming SymmetricLinearQuantizer (#50) --- distiller/quantization/range_linear.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/distiller/quantization/range_linear.py b/distiller/quantization/range_linear.py index e8187df..cfc51c6 100644 --- a/distiller/quantization/range_linear.py +++ b/distiller/quantization/range_linear.py @@ -166,7 +166,11 @@ class SymmetricLinearQuantizer(Quantizer): super(SymmetricLinearQuantizer, self).__init__(model, bits_activations=bits_activations, bits_weights=bits_parameters, train_with_fp_copy=False) - + + self.model.quantizer_metadata = {'type': type(self), + 'params': {'bits_activations': bits_activations, + 'bits_parameters': bits_parameters}} + def replace_fn(module, name, qbits_map): return RangeLinearQuantParamLayerWrapper(module, qbits_map[name].acts, qbits_map[name].wts) -- GitLab