Skip to content

Commit 6407a41

Browse files
authored
Remove JIT tracing section in onnx tutorial
The JIT strategy was removed and is thus no longer usable. Removing the section.
1 parent c4d9d93 commit 6407a41

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

beginner_source/onnx/export_control_flow_model_to_onnx_tutorial.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -96,19 +96,6 @@ def forward(self, x):
9696
except Exception as e:
9797
print(e)
9898

99-
###############################################################################
100-
# Using :func:`torch.onnx.export` with JIT Tracing
101-
# ----------------------------------------
102-
#
103-
# When exporting the model using :func:`torch.onnx.export` with the dynamo=True
104-
# argument, the exporter defaults to using JIT tracing. This fallback allows
105-
# the model to export, but the resulting ONNX graph may not faithfully represent
106-
# the original model logic due to the limitations of tracing.
107-
108-
109-
onnx_program = torch.onnx.export(model, (x,), dynamo=True)
110-
print(onnx_program.model)
111-
11299

113100
###############################################################################
114101
# Suggested Patch: Refactoring with :func:`torch.cond`
@@ -182,4 +169,4 @@ def neg(x):
182169
#
183170
# .. toctree::
184171
# :hidden:
185-
#
172+
#

0 commit comments

Comments
 (0)