Hi,
I am trying to do this:
a = torch.randn(4, 3, 10, 10)
b = torch.randn(4, 3, 10, 10)
x1 = torch.randint(0, 5, (4,))
y1 = torch.randint(0, 5, (4,))
x2 = torch.randint(6, 10, (4,))
y2 = torch.randint(6, 10, (4,))

b[:, :, x1:x2, y1:y2] = a[:, :, x1:x2, y1:y2]

This gives the error message of

TypeError: only integer tensors of a single element can be converted to an index

How could I make it work please ?