python使用from keras.utils import to_categorical出错 我使用的python编辑环境Sublime Text,keras的版本2.6.0,结果语句from keras.utils import to_categorical出错。 到keras\utils目录下,把所有文件打开查找去找to_categorical这个函数,发现是在文件np_utils.py中。