直接使用下面的语句会报错:‘Tensor’ object has no attribute ‘bool’
a = torch.ones(2,2)
a.bool()
应该改成:
a = torch.ones(2,2)
a.byte()
直接使用下面的语句会报错:‘Tensor’ object has no attribute ‘bool’
a = torch.ones(2,2)
a.bool()
应该改成:
a = torch.ones(2,2)
a.byte()