Suppose I have a batch of data with shape (2, 7, 7, 30), now if i want to rewrite:
[0, 2, 3, 0:2] [0, 2, 3, 5:7] and
[0, 3, 3, 0:2] [0, 3, 3, 5:7]
How to do it without using for loop but Pytorch API?
To illustrate my problem more clear, i want to indexing something like
[
:(whole batch),
{A 2-D tensor indicating the 1,2 dim of batch data},
{the real index i want to change}
],
How can i do it ?