Closed nevikw39 closed 8 months ago
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 are likely to be ignored.
pinging @ylacombe and @sanchit-gandhi
Great catch @nevikw39 and many thanks for the PR - just left a review: https://github.com/huggingface/transformers/pull/27863#pullrequestreview-1806592151
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 are likely to be ignored.
System Info
transformers
version: 4.35.1Who can help?
Seems like @sanchit-gandhi would be of help when it comes to Whisper.
In fact, this issue could be fixed easily and I have made it work on our machine by directly modifying the source codes of
transformer
library. Though I am going to create a pull request, I think I should submit an issue here still.Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Code Sample
The dataset used below is private due to license. So for one who wants to reproduce, he / she might need find a suitable dataset for audio regression.
Error Message
Proposed Solution
I found that the issue could be resolved by assigning appropriate loss function to
loss_fct
inforward()
method ofWhisperForAudioClassification
class. The pull request will be created latter.Expected behavior
We should be able to perform the regression task and the mean square error loss should be computed during forward process if
config.num_labels=1
as the documentation suggests.