Skip to content

Conversation

@BenoitWang
Copy link
Collaborator

Hello, this PR intends to add an option to ouput all the layers of HuggingFaceWav2Vec2. Some works have shown that different layers of wav2vec/HuBert/WavLM have different impact on different speech tasks. So this change may allow to study this effect.

An attribute output_all_hiddens (default: False) is added:
If True: outputs the hidden states from all transformer layers
If False: outputs the hidden states only from the last transformer layer

@Adel-Moumen Adel-Moumen self-requested a review September 13, 2022 19:40
Copy link
Collaborator

@Adel-Moumen Adel-Moumen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

Please fix some minor issues.

Note: I will refactor the hugging face interface so it might be possible that this code will change in the future.

@BenoitWang
Copy link
Collaborator Author

Hi @Adel-Moumen, thanks for the review, the fix is done.

Copy link
Collaborator

@Adel-Moumen Adel-Moumen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm ! Thanks for the pr. 🤗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants