Skip to content

Instantly share code, notes, and snippets.

@zilunpeng
Created March 23, 2021 21:07
Show Gist options
  • Save zilunpeng/ee791390f775496bedc7d03d65eaac29 to your computer and use it in GitHub Desktop.
Save zilunpeng/ee791390f775496bedc7d03d65eaac29 to your computer and use it in GitHub Desktop.
Get the output from wav2vec 2.0. Code below is part of the wav2vec 2.0 inference notebook (https://git.io/JYeKX).
encoder_out = model(**encoder_input)
emissions = model.get_normalized_probs(encoder_out, log_probs=True)
emissions = emissions.transpose(0, 1).float().cpu().contiguous()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment