I wanted to slice and change the values for certain conditions. Look at the toy code I wrote.
a = torch.randn(3, 3)
a[:, :][a > 0] = 0
This works, but if you sliced like this
a [:, (0, 1, 2)] [a > 0] = 0
It does not work.
Why? Do they work differently?