Created
March 23, 2021 21:03
-
-
Save zilunpeng/fa29cef75866c0dd31419e46418e1bea to your computer and use it in GitHub Desktop.
Create and load weights into wav2vec 2.0. Code below is part of the wav2vec 2.0 inference notebook (https://git.io/JYeKX).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
w2v = torch.load(model_path) | |
model = Wav2VecCtc.build_model(w2v["args"], target_dict) | |
model.load_state_dict(w2v["model"], strict=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment