Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. a = torch.rand(2,4)
  2. print(a)
  3. print(a.exp())
  4. print(a.exp().sum(-1))
  5. print(a.exp().sum(-1).shape)
  6. print(a.exp().sum(-1).unsqueeze(-1))
  7. print(a.exp().sum(-1).unsqueeze(-1).shape)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement