W3cubDocs

/PyTorch 2.9

torch.func.replace_all_batch_norm_modules_

torch.func.replace_all_batch_norm_modules_(root) [source]

In place updates root by setting the running_mean and running_var to be None and setting track_running_stats to be False for any nn.BatchNorm module in root

Return type

Module

© 2025, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://docs.pytorch.org/docs/2.9/generated/torch.func.replace_all_batch_norm_modules_.html