嚶嚶嚶心態(tài)崩了……
? 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??
? 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??
舉報
2017-11-03
Xi還是xi?要與前面的代碼【for xi, target in zip(X, y)】中的xi相一致。