随笔分类 - pytorch学习
摘要:1. RuntimeError: Expected object of scalar type Long but got scalar type Float for argument #2 'mat2'(期望对象为标量类型长,但得到标量类型浮点数) y= torch.matmul(x,w) 解决:y
        阅读全文
                
摘要:1. t.Tensor 和t.tensor的不同 t.Tensor(size)可以直接创建形为size的张量 t.tensor()需要t.tensor([1, 2])创建. 不论输入的类型是什么,t.tensor都会进行数据拷贝,不会共享内存 2. resize()和view()的不同 resize
        阅读全文
                
 

 浙公网安备 33010602011771号
浙公网安备 33010602011771号