Hi @Eta_C
Thanks for replying.
No, actually I have to do something like this:
import torch

# Sample tensor
X = torch.tensor([[1, 2, 3, 4, 5], [6, 7, 8, 9, 10]])
lst = []
for i in X:
    XorI = 0    
    for elem in i:
        XorI = elem ^ XorI    
    lst.append(XorI)

But without loops.
P.S. It would be better if there’s way for more than 2 dimensions as well, where I can reduce in 1 specified direction.