嘤嘤嘤心态崩了……

来源:3-2 实现感知器对象(下)

照清秋

2017-10-06 22:09

  File "……", line 40, in <module>

    ppn.fit(X,y)

  File "……", line 28, in fit

    self.w_[1:]+=update*Xi

ValueError: operands could not be broadcast together with shapes (5,) (2,) 


我感觉我都是照抄的啊怎么会有这种bug??

写回答 关注

1回答

  • 慕工程1597701
    2017-11-03 21:52:17

    Xi还是xi?要与前面的代码【for xi, target in zip(X, y)】中的xi相一致。

机器学习-实现简单神经网络

人工智能时代,你准备好成为抓住机遇的那百分之二吗。

67033 学习 · 184 问题

查看课程

相似问题