Skip to content

Commit cdb5438

Browse files
authored
Migrate executorch examples to use export_for_training
Differential Revision: D62142608 Pull Request resolved: #5036
1 parent 4e2cd6c commit cdb5438

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/models/test/test_export.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def collect_executorch_and_eager_outputs(
2929
Returns a tuple containing the outputs of the eager mode model and the executorch mode model.
3030
"""
3131
eager_model = eager_model.eval()
32-
model = torch._export.capture_pre_autograd_graph(eager_model, example_inputs)
32+
model = torch.export.export_for_training(eager_model, example_inputs).module()
3333
edge_model = export_to_edge(model, example_inputs)
3434

3535
executorch_prog = edge_model.to_executorch()

0 commit comments

Comments
 (0)