[Doctest] fix doc test for megatron bert (#19600)

This commit is contained in:
RamitPahwa 2022-10-14 05:08:55 -05:00 committed by GitHub
parent c7d1fb6964
commit 7036c956fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -77,12 +77,12 @@ class MegatronBertConfig(PretrainedConfig):
Examples:
```python
>>> from transformers import MegatronBertModel, MegatronBertConfig
>>> from transformers import MegatronBertConfig, MegatronBertModel
>>> # Initializing a MEGATRON_BERT bert-base-uncased style configuration
>>> configuration = MegatronBertConfig()
>>> # Initializing a model from the bert-base-uncased style configuration
>>> # Initializing a model (with random weights) from the bert-base-uncased style configuration
>>> model = MegatronBertModel(configuration)
>>> # Accessing the model configuration

View File

@ -68,6 +68,7 @@ src/transformers/models/longt5/modeling_longt5.py
src/transformers/models/marian/modeling_marian.py
src/transformers/models/markuplm/modeling_markuplm.py
src/transformers/models/mbart/modeling_mbart.py
src/transformers/models/megatron_bert/configuration_megatron_bert.py
src/transformers/models/mobilebert/configuration_mobilebert.py
src/transformers/models/mobilebert/modeling_mobilebert.py
src/transformers/models/mobilebert/modeling_tf_mobilebert.py