PyTorch Forums
Equivalent function like `numpy.diff` in pytorch?
ptrblck
January 30, 2020, 4:12am
6
Would this work for you?
x = torch.arange(4*5*6).view(4, 5, 6) idx = (x == 82).nonzero()
1 Like
Find indices with value (zeros)
show post in topic