我试图在Spider(Python3.8)上运行这段代码,但运行时出现以下错误:“ValueError: shapes (4,) and (3,4) not aligned: 4 (dim 0) != 3 (dim 0)”
import numpy as np
inputs = [1, 2, 3, 2.5]
weights = [[0.2, 0.8, -0.5, 1.0],
[0.5, -0.81, 1.7, -0.91],
[-0.67, 3, 0.6, -0.98]]
biases = [2, 3, 0.5]
output = np.dot(inputs, weights) + biases
print(output)你能帮我一下吗?
发布于 2020-11-16 07:02:01
如果A是任意m×n矩阵且AB和BA都有定义,则证明了B应该是m×n矩阵
https://stackoverflow.com/questions/64850461
复制相似问题