Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
9bb26f25
Unverified
Commit
9bb26f25
authored
Oct 17, 2022
by
Thomas
Committed by
GitHub
Oct 17, 2022
Browse files
[Doctest] Add `configuration_trocr.py` (#19658)
* trocr Config for doctest * ran make style
parent
c06a5a31
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
src/transformers/models/trocr/configuration_trocr.py
src/transformers/models/trocr/configuration_trocr.py
+2
-2
utils/documentation_tests.txt
utils/documentation_tests.txt
+1
-0
No files found.
src/transformers/models/trocr/configuration_trocr.py
View file @
9bb26f25
...
...
@@ -82,12 +82,12 @@ class TrOCRConfig(PretrainedConfig):
Example:
```python
>>> from transformers import TrOCR
ForCausalLM, TrOCRConfig
>>> from transformers import TrOCR
Config, TrOCRForCausalLM
>>> # Initializing a TrOCR-base style configuration
>>> configuration = TrOCRConfig()
>>> # Initializing a model from the TrOCR-base style configuration
>>> # Initializing a model
(with random weights)
from the TrOCR-base style configuration
>>> model = TrOCRForCausalLM(configuration)
>>> # Accessing the model configuration
...
...
utils/documentation_tests.txt
View file @
9bb26f25
...
...
@@ -114,6 +114,7 @@ src/transformers/models/swinv2/configuration_swinv2.py
src/transformers/models/time_series_transformer/configuration_time_series_transformer.py
src/transformers/models/time_series_transformer/modeling_time_series_transformer.py
src/transformers/models/trajectory_transformer/configuration_trajectory_transformer.py
src/transformers/models/trocr/configuration_trocr.py
src/transformers/models/trocr/modeling_trocr.py
src/transformers/models/unispeech/configuration_unispeech.py
src/transformers/models/unispeech/modeling_unispeech.py
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment