diff --git a/nni/algorithms/compression/pytorch/quantization/quantizers.py b/nni/algorithms/compression/pytorch/quantization/quantizers.py index 137516c49b..daf60a1251 100644 --- a/nni/algorithms/compression/pytorch/quantization/quantizers.py +++ b/nni/algorithms/compression/pytorch/quantization/quantizers.py @@ -341,8 +341,8 @@ def export_model(self, model_path, calibration_path=None, onnx_path=None, input_ if hasattr(module, BN_FOLD_TAG): actual_weight = getattr(module, 'old_weight', None) if actual_weight is None: - logger.warning("Can not recover weight for layer {}. " - "This may lead to a wrong accuracy performance on the backend.".format(name)) + logger.warning("Can not recover weight for layer %s. " + "This may lead to a wrong accuracy performance on the backend.", name) delattr(module, 'weight') module.register_parameter('weight', actual_weight)