mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
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:
committed by
PyTorch MergeBot
parent
75fe5a3ef7
commit
8dd380803c
@ -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
|
||||
|
Reference in New Issue
Block a user