python numpy的一些用法

torch python 参数 对于Stack of array(N>2) 用途
torch.mm(tensor,tensor) np.matmul (list,list) or (array,array);不可以是标量 有broadcast机制 矩阵乘法
tensor.dot(tensor) np.dot (array,array);可以是标量 无broadcast机制 矩阵乘法
  np.multiply (np.mat, np.mat)  or (array,array)   对应位置相乘
  *

(np.mat, np.mat)

(array,array)

 

矩阵乘法

对应位置相乘

猜你喜欢

转载自blog.csdn.net/github_38818603/article/details/81293836