Answers for "from keras.utils import to_categorical ImportError: cannot import name 'to_categorical'"

2

ImportError: cannot import name 'to_categorical'

#keras is now fully integrated into tensorflow, so import like this:
from tensorflow.keras.utils import to_categorical
Posted by: Guest on August-23-2021

Code answers related to "from keras.utils import to_categorical ImportError: cannot import name 'to_categorical'"

Python Answers by Framework

Browse Popular Code Answers by Language