问题
写代码的时候碰到过这个错误:
TypeError: new() received an invalid combination of arguments - got (list, dtype=torch.dtype), but expected one of:
原因
那么到底是hi什么原因呢? torch.Tensor()
和 torch.tensor()
写法会导致得到的tensor具有不同的数值类型。 具体示例如下:
torch.Tensor和torch.tensor有什么区别?
阅读 81
2022-08-20
写代码的时候碰到过这个错误:
TypeError: new() received an invalid combination of arguments - got (list, dtype=torch.dtype), but expected one of:
那么到底是hi什么原因呢? torch.Tensor()
和 torch.tensor()
写法会导致得到的tensor具有不同的数值类型。 具体示例如下:
相关推荐
精彩评论(0)