I want to make the value of a specific index equal to 0. but very very slow…
mask = [1,2,3,4]

input = torch.zeros(100,64,32,32)

for m in mask:
   for i in range(100):
      input[i][m] = 0

How do I optimize my code?