问题出在python3的编译器已经不用iteritems()了,将函数classify0中的代码改为item()即可。
相关文章
- 01-16机器学习实战第二章kNN报错:AttributeError: ‘dict‘ object has no attribute ‘iteritems‘
- 01-16机器学习实战:KNN代码报错“AttributeError: 'dict' object has no attribute 'iteritems'”
- 01-16facenet pyhton3.5 训练 train_softmax.py 时报错AttributeError: 'dict' object has no attribute 'iteritems'
- 01-16Python3下机器学习实战KNN代码出现AttributeError: ‘dict’ object has no attribute错误