Skip to content

Commit 8074180

Browse files
isacarnekvistsoumith
authored andcommitted
Faulty error message for InstanceNorm1d (pytorch#1609)
1 parent 5ce4a4a commit 8074180

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torch/nn/modules/instancenorm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ class InstanceNorm1d(_InstanceNorm):
7171
>>> m = nn.InstanceNorm1d(100)
7272
>>> # With Learnable Parameters
7373
>>> m = nn.InstanceNorm1d(100, affine=True)
74-
>>> input = autograd.Variable(torch.randn(20, 100))
74+
>>> input = autograd.Variable(torch.randn(20, 100, 40))
7575
>>> output = m(input)
7676
"""
7777

7878
def _check_input_dim(self, input):
7979
if input.dim() != 3:
80-
raise ValueError('expected 2D or 3D input (got {}D input)'
80+
raise ValueError('expected 3D input (got {}D input)'
8181
.format(input.dim()))
8282
super(InstanceNorm1d, self)._check_input_dim(input)
8383

0 commit comments

Comments
 (0)