Published
- 1 min read
to_categorical
The solution for this is noted below
to_categorical
Solution
from tensorflow.keras.utils import to_categorical
y_train_cat = to_categorical(y_train, num_classes=None, dtype='float32')
y_test_cat = to_categorical(y_test, num_classes=None, dtype='float32')
Try other methods by searching on the site. That is if this doesn’t work