Hello,
I have similar class imbalance problems where my class counts look like this:
{0: 112328,
1: 6321,
2: 169578,
3: 7140,
4: 3704,
5: 6600,
6: 3438,
7: 1155,
8: 1157,
9: 4528}
The following are what I tried:


setting the ignore index flag to the index of the most dominant class above, in the crossEntropy loss function. The overall accuracy went down and the model somehow started predicting the dominant  class more.


Tried setting weights in the CrossEntropyLoss function and it bumped up the overall accuracy but it still predicts the dominant class way better than the other classes.


Do we have any other work around? Thanks.