Output Dimension Of Keras Model
I use ImageDataGenerator to load my training data train_generator = train_datagen.flow_from_directory( directory= TRAIN_PATH, target_size=(224, 224), color_mode='rgb',
Solution 1:
you can solve simply changing the loss from sparse_categorical_crossentropy
to categorical_crossentropy
.
"categorical" mode in a generator will one-hot encode labels and this not suits with sparse_categorical_crossentropy
Post a Comment for "Output Dimension Of Keras Model"