首页
科技
登录
6mi
u
盘
搜
搜 索
科技
np.dot()函数主要有两个功能,向量点积和矩阵乘法
np.dot()函数主要有两个功能,向量点积和矩阵乘法
科技
2022-07-14
135
如果np.dot(a, b)⾥,a和b都是矩阵,那么进⾏的就是矩阵乘法
np.matmul(a, b) 也可以进⾏矩阵相乘
all_user_predicted_ratings
=
np
.
dot
(
np
.
dot
(
U
,
sigma
)
,
Vt
)
test
=
np
.
matmul
(
np
.
matmul
(
U
,
sigma
)
,
Vt
)
np
.
array_equal
(
test
,
all_user_predicted_ratings
)
# 判断两个array是否相同的⽅法
转载请注明原文地址:https://blackberry.8miu.com/read-7378.html
最新回复
(
0
)