Skip to content

Commit 6a013c5

Browse files
authored
fix model restore loading (#1683)
Signed-off-by: changwangss <chang1.wang@intel.com>
1 parent d80ab26 commit 6a013c5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

neural_compressor/utils/pytorch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,7 @@ def recover_model_from_json(model, json_file_path, example_inputs):
497497
model = ipex.quantization.prepare(model, qconfig, example_inputs=example_inputs, inplace=True)
498498
model.load_qconf_summary(qconf_summary=json_file_path)
499499
model = ipex.quantization.convert(model, inplace=True)
500+
model.eval()
500501
with torch.no_grad():
501502
try:
502503
if isinstance(example_inputs, dict):

0 commit comments

Comments
 (0)