The reason is that Variable methods always return a size-1 tensor for scalar results. Since the type of t is ByteTensor, it unfortunately returns this.
This is an known issue and will be fixed when we properly introduce scalar types. The issue is tracked here: https://github.com/pytorch/pytorch/issues/1389 39
To workaround this, you can cast the comparison results to long.