Skip to content

Commit 2acfb23

Browse files
DmitryUlyanovsoumith
authored andcommitted
fixes eval mode in InstanceNorm (pytorch#1604)
fixes pytorch#1541
1 parent 0c5598c commit 2acfb23

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torch/nn/modules/instancenorm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def forward(self, input):
2626

2727
out = F.batch_norm(
2828
input_reshaped, running_mean, running_var, weight, bias,
29-
self.training, self.momentum, self.eps)
29+
True, self.momentum, self.eps)
3030

3131
# Reshape back
3232
self.running_mean.copy_(running_mean.view(b, c).mean(0))

0 commit comments

Comments
 (0)