安装:pip install torch torchvision -i https://pypi.tuna.tsinghua.edu.cn/simple
运算:
- 矩阵乘矩阵:A*B/torch.mul(A, B)/ A.mul(B)
- 矩阵乘向量:torch.mv(A, b)或者b = torch.rand((4,1))
- 向量点乘:torch.dot(a, b)
安装:pip install torch torchvision -i https://pypi.tuna.tsinghua.edu.cn/simple
运算: