Class Weight doesn't solve imbalanced dataset problem I'm training convolutional neural network on imbalanced dataset, which has 9 classes. Number of classes in order is, 3000-500-500- .....   goes like this. Of course I'm not waiting %100 accuracy, but when I use class weight function from Scikit Learn and use it on Keras' Fit Function, it didn't get better than %60.80, even I change the weights, still same situation. 
When I didn't do any class weight operation, I get %68 accuracy. 
Also I also used smaller learning rates, still same.
I couldn't edit dataset because of the dimensions, (input: (5000,80,60,3), output: (5000,9)), it is hard to group this mixed dataset. Confused, why?
 A: This is probably because your accuracy measures the accuracy across all of you classes equally. If you set the class weights of the most represented classes lower, this will cause those classes to be classified less accurately compared to others, and since you have more of those classes the overall accuracy goes down.
A: I don't know much about neural network, but if it involves a subsampling process for building a network, chances are even if you increase the weight of the less popular samples it still have small chance to be "seen" in each sampling process.  I found it's better to replicate the unpopular cases to balance the training set and feed it into the algorithm.
A: If the accuracy you talked about is:
number of correct classifications / total samples
Then you are looking at the wrong metric. Indeed, one can construct a naive classifier that classifies all the samples in the most present class (without even looking at the samples) and such classifier would have very high accuracy.
If you have a class-imbalanced set, you should compute a confusion matrix (link) and measure precision, recall, f1 score by running
from sklearn.metrics import classification_report
print( classification_report(y_test_true, y_test_predicted) )

