I am working on training a VGG16-like model in Keras, on a 3 classes subset from Places205, and encountered the following error:
ValueError: Error when chec
For me, this worked.
from keras.utils import to_categorical
num_labels=10 #for my case
train_labels=to_categorical(train_labels,10)
test_labels=to_categorical(test_labels,10)
Specifying the number of labels as an argument while categorically encoding my labels helped train effectively on my training set.