I have two code with difference pytorch version
In torch 1.0.0
torch.randn(4, 4).view(-1)>0. The result of this is tensor([0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1], dtype=torch.uint8)
In torch 1.7.1
torch.randn(4, 4).view(-1)>0. The result of this is tensor([ True, True, False, False, False, True, False, True, False, True, True, True, False, True, False, False])
I don’t know what is happen?
Note: This is no problem for me, i can solve with key word “convert true flase to 0 1 python”. But i want to know how to torch work.
Thanks for reading.