Skip to content

Commit

Permalink
changed 'output' to 'input'
Browse files Browse the repository at this point in the history
  • Loading branch information
jonykarki committed Dec 24, 2020
1 parent 4d61109 commit 48accc5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions torch/nn/modules/flatten.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,23 +71,23 @@ class Unflatten(Module):
>>> nn.Linear(50, 50),
>>> nn.Unflatten(1, (2, 5, 5))
>>> )
>>> output = m(output)
>>> output = m(input)
>>> output.size()
torch.Size([2, 2, 5, 5])
>>> # With torch.Size
>>> m = nn.Sequential(
>>> nn.Linear(50, 50),
>>> nn.Unflatten(1, torch.Size([2, 5, 5]))
>>> )
>>> output = m(output)
>>> output = m(input)
>>> output.size()
torch.Size([2, 2, 5, 5])
>>> # With namedshape (tuple of tuples)
>>> m = nn.Sequential(
>>> nn.Linear(50, 50),
>>> nn.Unflatten('features', (('C', 2), ('H', 50), ('W',50)))
>>> )
>>> output = m(output)
>>> output = m(input)
>>> output.size()
torch.Size([2, 2, 5, 5])
"""
Expand Down

0 comments on commit 48accc5

Please sign in to comment.