I  have a torch.autograd.variable.Variable ‘target’ with data of type torch.cuda.LongTensor.  I want to run this:
target = target[mask]
This works:
mask = target >=0
This:
mask = target >= 0 and target < 128
doesn’t work:
RuntimeError: bool value of Variable objects containing non-empty torch.cuda.ByteTensor is ambiguous.
What am I doing wrong?