numpy 三维数组相乘_三维数组

 

https://stackoverflow.com/questions/64952700/multiplying-two-3d-pytorch-tensors-iteratively

 

numpy 三维数组相乘

import numpy as np
a=np.zeros((2,2,2))
a[:,:,0]=([[3,6],[5,8]])
a[:,:,1]=([[2,5],[7,2]])
b=np.zeros((2,2,2))
b[:,:,0]=([[3,2],[9,6]])
b[:,:,1]=([[7,8],[1,0]])
c=a*b

 

 

pytorch 三维张量相乘