Skip to content

Commit 91e03b9

Browse files
authored
Fixing incorrect doc example in MNASNet. (#3180)
* Fixing incorrect doc example in MNASNet. * Fixing incorrect output.
1 parent 1a300d8 commit 91e03b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torchvision/models/mnasnet.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@ def _get_depths(alpha: float) -> List[int]:
9393
class MNASNet(torch.nn.Module):
9494
""" MNASNet, as described in https://arxiv.org/pdf/1807.11626.pdf. This
9595
implements the B1 variant of the model.
96-
>>> model = MNASNet(1000, 1.0)
96+
>>> model = MNASNet(1.0, num_classes=1000)
9797
>>> x = torch.rand(1, 3, 224, 224)
9898
>>> y = model(x)
9999
>>> y.dim()
100-
1
100+
2
101101
>>> y.nelement()
102102
1000
103103
"""

0 commit comments

Comments
 (0)