wav2vec2 : No MSELoss implementation
### System Info

modeling_wav2vec2.py  : 1822 lines only implements CrossEntropyLoss()
  if labels is not None:
            loss_fct = CrossEntropyLoss()
            loss = loss_fct(logits.view(-1, self.config.num_labels), labels.view(-1))


labels (torch.LongTensor of shape (batch_size,), optional) — Labels for computing the sequence classification/regression loss. Indices should be in [0, ..., config.num_labels - 1]. If config.num_labels == 1 a regression loss is computed (Mean-Square loss), If config.num_labels > 1 a classification loss is computed (Cross-Entropy).
Returns


### Who can help?

_No response_

### Information

- [ ] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

model = AutoModelForAudioClassification.from_pretrained(
    "facebook/wav2vec2-base", num_labels=1)  

### Expected behavior

Calculate MSELoss
Hey @LaurenceYozi

Indeed! The MSE loss is not implemented. Would you like to open a PR to add this? You can refer to BERT for the loss function/labels logic:
https://github.com/huggingface/transformers/blob/cfd623a859890c6d106610d3c688064eadc7bd61/src/transformers/models/bert/modeling_bert.py#L1578-L1598
You should be able to copy this almost one-for-one from BERT to Wav2Vec2!<|||||>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/main/CONTRIBUTING.md) are likely to be ignored.