SHARE
TWEET

Untitled

a guest Jun 19th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top