'Perceptron' object has no attribute 'predict'

来源:3-4 神经网络对数据实现分类(上)

慕神2257579

2019-09-03 19:11


http://img.mukewang.com/5d6e4b4e00019bd407290738.jpg

net_input()和predict()在fit()里面会报错:'Perceptron' object has no attribute 'predict',但是把这两个函数放在fit()同级也会报错:numpy.core._exceptions.UFuncTypeError: ufunc 'subtract' did not contain a loop with signature matching types (dtype('<U11'), dtype('<U11')) -> dtype('<U11')

写回答 关注

1回答

  • qq_老六_2
    2019-09-25 14:48:40

    predict函数和fit函数对齐就可以了。刚刚才发现的。

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

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

66715 学习 · 182 问题

查看课程

相似问题