Hey, I have a question about torch.where.
I want to get this:
image[x,y]=p, where x, y, p are lists. For example,
x=[1, 1, 2]
y=[3, 3, 4]
p=[1, 2, 3]
It should be mentioned that image[x][y] may be updated twice, since x=x=1, y=y=3, but p=1, p=2. In this case, image should be the minimum, 1.
But torch.where cannot achieve this, and the comparison may be done in parallel, so image is not the minimum.
Is there an efficient way to do this? Better use OP of Pytorch. I can update image in a for loop, but it’s too slow, since the len(x) is big.