Ah. Ok. I figured it out.  No it is a 1-dim tensor. But the if statement gives weird results if mask is a Variable. If its a tensor, it works fine.
m=Variable(torch.rand(3,4))
if m[0][1]  > 0:
print(‘passed’)
vs
m=torch.rand(3,4)
if m[0][1]  > 0:
print(‘passed’)