Add class re-weighting mechanism for classification tasks
In supervised ML classification problems, specially multiclass/multilabel, the classes in the datasets used to train a model may have very different distribution of discrete values, which is usually called class imbalance. The class imbalance may cause biases in the training of the models. DL frameworks like PyTorch or TF, allow in their loss functions (e.g. CrossEntropyLoss, BCEWithLogitsLoss...) certain parameters to adjust the possible imbalance of data in the classes. Currently, the HF framework does not allow to take advantage of these parameters, so it would be nice to have support of a class re-weighting mechanism at the HF level to improve the possible biases in the models when doing fine-tunings.

# What does this PR do?

Tentative implementation for a class re-weighting mechanism for classification tasks. WIP

The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_15449). All of your documentation changes will be reflected on that endpoint.<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) are likely to be ignored.