Skip to content

Commit f0873ca

Browse files
authored
[Torch Fx] Migrate example to torch.export.export_for_training (#3086)
### Changes Migrate torch.export.export in examples to torch.export.export_for_training
1 parent 90d15a6 commit f0873ca

File tree

1 file changed

+1
-1
lines changed
  • examples/post_training_quantization/torch_fx/resnet18

1 file changed

+1
-1
lines changed

examples/post_training_quantization/torch_fx/resnet18/main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def transform_fn(data_item):
194194
example_input = torch.ones(*input_shape).to(device)
195195

196196
with disable_patching():
197-
fx_model = torch.export.export(model.eval(), args=(example_input,)).module()
197+
fx_model = torch.export.export_for_training(model.eval(), args=(example_input,)).module()
198198
quantized_fx_model = nncf.quantize(fx_model, quantization_dataset)
199199
quantized_fx_model = torch.compile(quantized_fx_model, backend="openvino")
200200

0 commit comments

Comments
 (0)