Skip to content

Commit

Permalink
[Release][TorchFX] Migrate example to torch.export.export_for_training (
Browse files Browse the repository at this point in the history
#3088)

Moving PR #3086 to release branch

### Changes

Migrate torch.export.export in examples to
torch.export.export_for_training
  • Loading branch information
anzr299 authored Nov 14, 2024
1 parent e269fab commit bee2d7b
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 bee2d7b

Please sign in to comment.