Skip to content

Commit

Permalink
Clarify JIT docs
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: #17846

Differential Revision: D14400363

Pulled By: jamesr66a

fbshipit-source-id: 862316b5fd95526b6edebeca19d2cc522779df11
  • Loading branch information
James Reed authored and facebook-github-bot committed Mar 10, 2019
1 parent 24e7b82 commit 81e025d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions torch/jit/__init__.py
Expand Up @@ -1062,9 +1062,8 @@ def foo(x, y):
+ Tracing will not record any control-flow like if statements or loops. When
this control-flow is constant across your module, this is fine and it often
just inlines configuration decisions. But sometimes the control-flow is
actually part of the model itself. For instance, a beam search in
sequence-to-sequence translation is a loop over the (varying) sequence
length of inputs.
actually part of the model itself. For instance, a recurrent network is
a loop over the (possibly dynamic) length of an input sequence.
+ In the returned ``ScriptModule``, operations that have different behaviors
in ``training`` and ``eval`` modes will always behave as if it is in the
Expand Down

0 comments on commit 81e025d

Please sign in to comment.