Thank you so much! That helped a lot.
I might have to try to find a different way other than using torch.max then. I somehow have to get a 1 value if the pair consists of [0, 0] or [1, 1] and a 0 value in all other cases, so I’ll have to think about that some more.