Skip to content

Commit 81e025d

Browse files
James Reedfacebook-github-bot
authored andcommitted
Clarify JIT docs
Summary: Pull Request resolved: #17846 Differential Revision: D14400363 Pulled By: jamesr66a fbshipit-source-id: 862316b5fd95526b6edebeca19d2cc522779df11
1 parent 24e7b82 commit 81e025d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

torch/jit/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,9 +1062,8 @@ def foo(x, y):
10621062
+ Tracing will not record any control-flow like if statements or loops. When
10631063
this control-flow is constant across your module, this is fine and it often
10641064
just inlines configuration decisions. But sometimes the control-flow is
1065-
actually part of the model itself. For instance, a beam search in
1066-
sequence-to-sequence translation is a loop over the (varying) sequence
1067-
length of inputs.
1065+
actually part of the model itself. For instance, a recurrent network is
1066+
a loop over the (possibly dynamic) length of an input sequence.
10681067
10691068
+ In the returned ``ScriptModule``, operations that have different behaviors
10701069
in ``training`` and ``eval`` modes will always behave as if it is in the

0 commit comments

Comments
 (0)