Skip to content

Commit 85c9ca3

Browse files
Update tutorials/docs-10-using-turing-autodiff/index.qmd
Co-authored-by: Tor Erlend Fjelde <[email protected]>
1 parent 5e03a1e commit 85c9ca3

File tree

1 file changed

+1
-1
lines changed
  • tutorials/docs-10-using-turing-autodiff

1 file changed

+1
-1
lines changed

tutorials/docs-10-using-turing-autodiff/index.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ For `ReverseDiff`, pass `adtype=AutoReverseDiff()` to the sampler constructor. A
2727
Pre-recorded tapes should only be used if you are absolutely certain that the sequence of operations performed in your code does not change between different executions of your model.
2828

2929
Thus, e.g., in the model definition and all implicitly and explicitly called functions in the model, all loops should be of fixed size, and `if`-statements should consistently execute the same branches.
30-
For instance, `if`-statements with conditions that can be determined at compile time or conditions that depend only on fixed properties of the data will always execute the same branches during sampling (if the data is constant throughout sampling and, e.g., no mini-batching is used).
30+
For instance, `if`-statements with conditions that can be determined at compile time or conditions that depend only on fixed properties of the model, e.g. fixed data.
3131
However, `if`-statements that depend on the model parameters can take different branches during sampling; hence, the compiled tape might be incorrect.
3232
Thus you must not use compiled tapes when your model makes decisions based on the model parameters, and you should be careful if you compute functions of parameters that those functions do not have branching which might cause them to execute different code for different values of the parameter.
3333

0 commit comments

Comments
 (0)