Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >> a = torch.randn(4, 4)
- >> a
- 0.0692 0.3142 1.2513 -0.5428
- 0.9288 0.8552 -0.2073 0.6409
- 1.0695 -0.0101 -2.4507 -1.2230
- 0.7426 -0.7666 0.4862 -0.6628
- torch.FloatTensor of size 4x4]
- >>> torch.max(a, 1)
- (
- 1.2513
- 0.9288
- 1.0695
- 0.7426
- [torch.FloatTensor of size 4]
- ,
- 2
- 0
- 0
- 0
- [torch.LongTensor of size 4]
- )
- 0.9477 1.0090 0.8348 -1.3513
- -0.4861 1.2581 0.3972 1.5751
- -1.2277 -0.6201 -1.0553 0.6069
- 0.1688 0.1373 0.6544 -0.7784
- [torch.FloatTensor of size 4x4]
- (
- 1.0090
- 1.5751
- 0.6069
- 0.6544
- [torch.FloatTensor of size 4]
- ,
- 1
- 3
- 3
- 2
- [torch.LongTensor of size 4]
- )
Add Comment
Please, Sign In to add comment