Skip to content

Commit bcf0afc

Browse files
committed
Adding more norm layers in split_normalization_params.
1 parent 6c12921 commit bcf0afc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

torchvision/ops/_utils.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@ def split_normalization_params(
4343
) -> Tuple[List[Tensor], List[Tensor]]:
4444
# Adapted from https://github.com/facebookresearch/ClassyVision/blob/659d7f78/classy_vision/generic/util.py#L501
4545
if not norm_classes:
46-
norm_classes = [nn.modules.batchnorm._BatchNorm, nn.LayerNorm, nn.GroupNorm]
46+
norm_classes = [
47+
nn.modules.batchnorm._BatchNorm,
48+
nn.LayerNorm,
49+
nn.GroupNorm,
50+
nn.modules.instancenorm._InstanceNorm,
51+
nn.LocalResponseNorm,
52+
]
4753

4854
for t in norm_classes:
4955
if not issubclass(t, nn.Module):

0 commit comments

Comments
 (0)