Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
chenbohua3 committed Jul 12, 2021
1 parent 003626f commit 1247ce0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nni/algorithms/compression/pytorch/quantization/quantizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 1247ce0

Please sign in to comment.