Labels unevenness problems--data preprocessing

In many datasets, I got a problem like there are different numbers of data in different labels, how do I reinforce the data to reduce this kind of unevenness so that model predictions won’t bias to the labels of more numbers??

You could use a weighted loss as described e.g. in the nn.CrossEntropyLoss docs or alternatively you could use over/undersampling using a WeightedRandomSampler.
Here is an example of its usage.