from keras.utils import to_categorical导入categorical时报错,如下:ImportError: cannot import name ‘to_categorical’ from ‘keras.utils’将导入代码改为如下即可:``````pythonfrom tensorflow.keras.utils import to_categorical
时间:2021-08-12 19:35:35
from keras.utils import to_categorical导入categorical时报错,如下:ImportError: cannot import name ‘to_categorical’ from ‘keras.utils’将导入代码改为如下即可:``````pythonfrom tensorflow.keras.utils import to_categorical