-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Closed
Description
a = torch.tensor([1., 1., 1., 1., 0., 2.]).view(2, 3)
print(a)
print(a.flip(1))
------------------------
tensor([[1., 1., 1.],
[1., 0., 2.]])
tensor([[1., 1.],
[0., 1.]])
It works fine in CUDA implementation:
a = torch.tensor([1., 1., 1., 1., 0., 2.], device=torch.device('cuda')).view(2, 3)
print(a)
print(a.flip(1))
------------------------
tensor([[1., 1., 1.],
[1., 0., 2.]], device='cuda:0')
tensor([[1., 1., 1.],
[2., 0., 1.]], device='cuda:0')
Metadata
Metadata
Assignees
Labels
No labels