Hi,
what is the fastest method to index simultaneously multiple blocks in a torch tensor to modify them?
Here an example: i take the first two rows after every 4 rows and modify them:
a=torch.rand(8,8)
a[0:2,:]=2*a[0:2,:]
a[4:6,:]=2*a[4:6,:]
I want to avoid the for loop to reduce the execution time.
Thanks!