1、UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position 17: ordinal not in range(128)
https://blog.csdn.net/qq_41185868/article/details/79039604
training_data, validation_data, test_data = cPickle.load(f)
改为即可,training_data, validation_data, test_data = cPickle.load(f,encoding='bytes')
2、ValueError: num_outputs type should be one of [<class 'int'>], got <class 'float'>.
float强制转化成int
3、TypeError: 'float' object cannot be interpreted as an integer
在python2,/
只留下了整数部分,去掉了小数,是int型。而在python3里,/
的结果是真正意义上的除法,结果是float型。所以便出现了Error Message: ‘float’ object cannot be interpreted as an integer。
4、AttributeError: module '_pickle' has no attribute 'HIGHEST_PROTOCOL'
_pickle改为pickle