"...model/git@developer.sourcefind.cn:wangsen/mineru.git" did not exist on "66e3ce9c4a08fc6a7628b0f596a90ab4ae7cf464"
Unverified Commit 4a6a35bc authored by Yih-Dar's avatar Yih-Dar Committed by GitHub
Browse files

[Fix doc example] missing import (#15240)



* fix import

* fix style
Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
parent 08b41b41
...@@ -259,6 +259,8 @@ class TFEncoderDecoderModel(TFPreTrainedModel): ...@@ -259,6 +259,8 @@ class TFEncoderDecoderModel(TFPreTrainedModel):
```python ```python
>>> # a workaround to load from pytorch checkpoint >>> # a workaround to load from pytorch checkpoint
>>> from transformers import EncoderDecoderModel, TFEncoderDecoderModel
>>> _model = EncoderDecoderModel.from_pretrained("patrickvonplaten/bert2bert-cnn_dailymail-fp16") >>> _model = EncoderDecoderModel.from_pretrained("patrickvonplaten/bert2bert-cnn_dailymail-fp16")
>>> _model.encoder.save_pretrained("./encoder") >>> _model.encoder.save_pretrained("./encoder")
>>> _model.decoder.save_pretrained("./decoder") >>> _model.decoder.save_pretrained("./decoder")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment