Posted on 8th May 2024
We can simply set class_weight = auto to weight all the classes equally see the below example.
model.fit(X_train, Y_train, nb_epoch=5, batch_size=32, class_weight = 'auto')
If you are looking for the Keras certification course, you can check out this Keras course by Mindmajix.
STILL GOT QUERIES?