TypeError: tensor(): argument ‘dtype‘ must be torch.dtype, not type
TypeError: tensor(): argument ‘dtype‘ must be torch.dtype, not type
产生原因
tensor = torch.tensor([1,3,6], dtype=float32)
解决方案
tensor = torch.tensor([1,3,6], dtype=torch.float32)
以上就是全部内容