matlab三维张量按页相乘
matlab三维张量按页相乘function y = matrix_times(x,y)% 三维矩阵按页相乘(not @times),页数相同 [row_x,col_x,p] = size(x); [row_y,col_y,p] = size(y);% col_x == row_y x1 = reshape(x,row_x,col_x,1,p); y1 = reshape(y,row_y,1,col_y,p); y2 = permute(y1,[2 1 3 4]); % (1
转载
2020-12-29 16:30:37 ·
1037 阅读 ·
0 评论