Skip to content

Commit

Permalink
[Torch Fx] Migrate example to torch.export.export_for_training (openv…
Browse files Browse the repository at this point in the history
…inotoolkit#3086)

### Changes

Migrate torch.export.export in examples to
torch.export.export_for_training
  • Loading branch information
anzr299 authored and nikita-savelyevv committed Nov 21, 2024
1 parent cd79f03 commit f6bbe87
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

0 comments on commit f6bbe87

Please sign in to comment.