Skip to content

change defaults for Dropout and BatchNorm#224

Merged
copybara-service[bot] merged 1 commit intomainfrom
test_877557956
Mar 3, 2026
Merged

change defaults for Dropout and BatchNorm#224
copybara-service[bot] merged 1 commit intomainfrom
test_877557956

Conversation

@copybara-service
Copy link
Copy Markdown

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)

  1. Passing them to call:

self.dropout(x, deterministic=False)

  1. Using nnx.view to create a view of the model with specific values:

train_model = nnx.view(model, detereministic=False, use_running_average=False)

@copybara-service copybara-service Bot force-pushed the test_877557956 branch 3 times, most recently from 07ef620 to 3d82a6e Compare March 3, 2026 22:56
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: 878145896
@copybara-service copybara-service Bot merged commit 3444bc2 into main Mar 3, 2026
@copybara-service copybara-service Bot deleted the test_877557956 branch March 3, 2026 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants