diff --git a/examples/post_training_quantization/torch_fx/resnet18/main.py b/examples/post_training_quantization/torch_fx/resnet18/main.py index 6b89bcc7833..eb348e9bfd7 100644 --- a/examples/post_training_quantization/torch_fx/resnet18/main.py +++ b/examples/post_training_quantization/torch_fx/resnet18/main.py @@ -194,7 +194,7 @@ def transform_fn(data_item): example_input = torch.ones(*input_shape).to(device) with disable_patching(): - fx_model = torch.export.export(model.eval(), args=(example_input,)).module() + fx_model = torch.export.export_for_training(model.eval(), args=(example_input,)).module() quantized_fx_model = nncf.quantize(fx_model, quantization_dataset) quantized_fx_model = torch.compile(quantized_fx_model, backend="openvino")