課程
/后端開發
/Python
/機器學習-實現簡單神經網絡
為什么總是顯示AttributeError: 'Perceptron' object has no attribute 'predict'
新手求大神賜教,感激不盡
2017-04-19
源自:機器學習-實現簡單神經網絡 3-5
正在回答
把net_input? predict函數拿到fit函數外部 與fit函數平級? 檢查下自己的函數名以及 __init__函數
原因是因為你的 def predict(self,X)縮進有問題
你是不是沒寫predict函數
舉報
人工智能時代,你準備好成為抓住機遇的那百分之二嗎。
1 回答怎么沒fit就直接predict了?
2 回答AttributeError: 'Perceptron' object has no attribute 'predict'
4 回答NameError: global name 'predict' is not defined
1 回答'numpy' has no attribute 'predict'
1 回答'Perceptron' object has no attribute 'predict'
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2018-12-21
把net_input? predict函數拿到fit函數外部 與fit函數平級? 檢查下自己的函數名以及 __init__函數
2017-05-03
原因是因為你的 def predict(self,X)縮進有問題
2017-04-29
你是不是沒寫predict函數