remove allow-untyped-defs for torch/_functorch/batch_norm_replacement.py (#143438)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/143438
Approved by: https://github.com/oulgen
This commit is contained in:
bobrenjc93
2024-12-17 18:58:04 -08:00
committed by PyTorch MergeBot
parent 75fe5a3ef7
commit 8dd380803c

View File

@ -1,10 +1,8 @@
# mypy: allow-untyped-decorators
# mypy: allow-untyped-defs
import torch.nn as nn
from torch._functorch.utils import exposed_in
def batch_norm_without_running_stats(module: nn.Module):
def batch_norm_without_running_stats(module: nn.Module) -> None:
if (
isinstance(module, nn.modules.batchnorm._BatchNorm)
and module.track_running_stats