当我将正确维度的numpy数组传递给下面的函数时,我得到一个错误:TypeError:不能将sequence乘以类型为“float”的非int。
see picture
请帮忙。在
def linear_forward(A, W, b):
print('W.type:', type(W), 'W.shape:', W.shape)
print('A.type:', type(A), 'A.shape:', A.shape)
Z = np.dot(W, A) + b
assert (Z.shape == (W.shape[0], A.shape[1]))
cache = (A, W, b)
return Z, cache
W由这里的代码生成(它等于参数['W1']):
^{pr2}$
发现了问题。数据集中有字符串。在
相关问题 更多 >
编程相关推荐