You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _posts/2021-6-15-pytorch-1.9-new-library-releases.md
+13-9Lines changed: 13 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,25 +103,26 @@ We have added the model architectures from [Wav2Vec2.0](https://arxiv.org/abs/20
103
103
The following code snippet illustrates such a use case. Please check out our [c++ example directory](https://github.com/pytorch/audio/tree/master/examples/libtorchaudio) for the complete example. Currently, it is designed for running inference. If you would like more support for training, please file a feature request.
104
104
105
105
```python
106
-
{:.table.table-striped.table-bordered}
107
-
|# Import fine-tuned model from Hugging Face Hub
106
+
# Import fine-tuned model from Hugging Face Hub
108
107
import transformers
109
108
from torchaudio.models.wav2vec2.utils import import_huggingface_model
110
109
111
110
original = Wav2Vec2ForCTC.from_pretrained("facebook/wav2vec2-base-960h")
112
-
imported = import_huggingface_model(original)|
111
+
imported = import_huggingface_model(original)
112
+
```
113
113
114
-
{:.table.table-striped.table-bordered}
115
-
|# Import fine-tuned model from fairseq
114
+
```python
115
+
# Import fine-tuned model from fairseq
116
116
import fairseq
117
117
from torchaudio.models.wav2vec2.utils import import_fairseq_model
For more details, see [the documentation](https://pytorch.org/audio/0.9.0/models.html#wav2vec2-0).
@@ -198,3 +199,6 @@ For more details, refer to [the documentation](https://pytorch.org/text/stable/v
198
199
199
200
Thanks for reading. If you’re interested in these updates and want to join the PyTorch community, we encourage you to join [the discussion](https://discuss.pytorch.org/) forums and [open GitHub issues](https://github.com/pytorch/pytorch/issues). To get the latest news from PyTorch, follow us on [Facebook](https://www.facebook.com/pytorch/), [Twitter](https://twitter.com/PyTorch), [Medium](https://medium.com/pytorch), [YouTube](https://www.youtube.com/pytorch) or [LinkedIn](https://www.linkedin.com/company/pytorch).
0 commit comments