Skip to content

Commit fb775f8

Browse files
committed
Point the to right _BatchNorm.
1 parent 12357aa commit fb775f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

references/classification/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def bn_reinitialization(model: torch.nn.Module, gamma: float = 1.0, beta: float
197197
beta (float): The beta initial value.
198198
"""
199199
for module in model.modules():
200-
if isinstance(module, torch.nn._BatchNorm):
200+
if isinstance(module, torch.nn.modules.batchnorm._BatchNorm):
201201
module.weight.fill_(gamma)
202202
module.bias.fill_(beta)
203203

0 commit comments

Comments
 (0)