code_16.py 292 字节
Newer Older
ToTensor's avatar
ToTensor 已提交
1 2 3 4 5 6 7
matrix_01 = np.arange(0, 6).reshape(2, 3)
matrix_02 = np.arange(0, 6).reshape(3, 2)
print(matrix_01)
print(matrix_02)
print ('01和02的点积:', np.dot(matrix_01, matrix_02))
print ('02和01的点积:', np.dot(matrix_02, matrix_01))
print ('01和01的点积:', np.dot(matrix_01, matrix_01))