评价此页

torch.func.replace_all_batch_norm_modules_#

torch.func.replace_all_batch_norm_modules_(root)[源代码]#

就地更新 root,将 running_meanrunning_var 设置为 None,并将 track_running_stats 设置为 False,用于 root 中的任何 nn.BatchNorm 模块。

返回类型

模块