Commit 095502a
change defaults for Dropout and BatchNorm
Changes `Dropout.deterministic` and `BatchNorm.use_running_average` to be None by default, use now has to explicitely provide them by either:
1. Passing them to the constructor e.g:
self.bn = nnx.BatchNorm(..., use_running_average=False)
2. Passing them to __call__:
self.dropout(x, deterministic=False)
3. Using `nnx.view` to create a view of the model with specific values:
train_model = nnx.view(model, detereministic=False, use_running_average=False)
PiperOrigin-RevId: 8781474221 parent 68e0696 commit 095502a
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1011 | 1011 | | |
1012 | 1012 | | |
1013 | 1013 | | |
1014 | | - | |
| 1014 | + | |
1015 | 1015 | | |
1016 | 1016 | | |
1017 | 1017 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
| 240 | + | |
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| |||
0 commit comments