Skip to content

Commit fbfc25f

Browse files
committed
add a warning about other AD breaking automagic train mode
1 parent 19f7ee7 commit fbfc25f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/src/models/layers.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ Flux.dropout
127127

128128
Several normalisation layers behave differently under training and inference (testing). By default, Flux will automatically determine when a layer evaluation is part of training or inference.
129129

130+
!!! warning
131+
This automatic train/test detection works best with Zygote, the default
132+
automatic differentiation package. It may not work with other packages
133+
such as Tracker, Yota, or ForwardDiff.
134+
130135
The functions `Flux.trainmode!` and `Flux.testmode!` let you manually specify which behaviour you want. When called on a model, they will place all layers within the model into the specified mode.
131136

132137
```@docs

0 commit comments

Comments
 (0)