改寫CNN的一些問題解決方法

最近寫神經網絡遇到的一些問題,記錄存檔。

 

1.NameError: global name 'sys' is not defined

解決方法:import sys

 

2.NameError: global name 'os' is not defined

解決方法:import os

 

3.ValueError: Shape mismatch: x has 17 cols (and 20 rows) but y has 11 rows (and 2 cols)

解決方法:檢查HiddenLayer的層之間的輸入輸出是否正確。

 

4.SyntaxError: Non-ASCII character '\xe6' in file fibonacci.py on line 3, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

解決方法:開頭添加 #encoding: utf-8

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章