导入categorical时报错,如下

在这里插入图片描述

解决方法:

将:
from keras.utils import to_categorical
改为:
from tensorflow.python.keras.utils.np_utils import to_categorical
即可

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐