Skip to content

Instantly share code, notes, and snippets.

@zilunpeng
Created March 23, 2021 21:01
Show Gist options
  • Save zilunpeng/aefe34d8e4b712f285687f0a2fc67da8 to your computer and use it in GitHub Desktop.
Save zilunpeng/aefe34d8e4b712f285687f0a2fc67da8 to your computer and use it in GitHub Desktop.
Create mapping between tokens and indices. Code below is part of the wav2vec 2.0 inference notebook (https://git.io/JYeKX).
target_dict = fairseq_mod.data.Dictionary.load('ltr_dict.txt')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment