Hi,
Consider the following example:
idxs = [[0, 1, 2, 1], [3, 2, 1, 3]]
scores = [[0.5000, 0.8000, 0.5000, 0.5000], [0.5000, 0.5000, 0.5000, 0.9000]]

Within a batch of idxs, I would like to only retain values with the largest corresponding score entry and replace the rest with -1.
So I would expect an output:
out = [[ 0, 1, 2, -1], [ -1, 2, 1, 3]]
How can I achieve something like this?
Thanks