Solved by ptrblck in post #2 
              
              
                This should work: 
a = torch.zeros(1024)
b = torch.randn(5, 20, 1024)
b[2, 17].fill_(0.)

idx = (a == b).all(dim=2).nonzero()