Shortcuts

torch.func.替换所有批量归一化模块_

torch.func.replace_all_batch_norm_modules_(root)

通过将 running_meanrunning_var 设置为 None,并将 track_running_stats 设置为 False,对 root 中的任何 nn.BatchNorm 模块进行原地更新。

Return type

模块

优云智算