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
afb07a79
Unverified
Commit
afb07a79
authored
Sep 17, 2021
by
Yih-Dar
Committed by
GitHub
Sep 17, 2021
Browse files
fix some docstring in encoder-decoder models (#13611)
Co-authored-by:
ydshieh
<
ydshieh@users.noreply.github.com
>
parent
19b7acdd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
src/transformers/models/encoder_decoder/modeling_encoder_decoder.py
...ormers/models/encoder_decoder/modeling_encoder_decoder.py
+2
-2
src/transformers/models/speech_encoder_decoder/modeling_speech_encoder_decoder.py
...speech_encoder_decoder/modeling_speech_encoder_decoder.py
+4
-4
No files found.
src/transformers/models/encoder_decoder/modeling_encoder_decoder.py
View file @
afb07a79
...
@@ -53,7 +53,7 @@ ENCODER_DECODER_START_DOCSTRING = r"""
...
@@ -53,7 +53,7 @@ ENCODER_DECODER_START_DOCSTRING = r"""
general usage and behavior.
general usage and behavior.
Parameters:
Parameters:
config (:class:`~transformers.
Pretrained
Config`): Model configuration class with all the parameters of the model.
config (:class:`~transformers.
EncoderDecoder
Config`): Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the :meth:`~transformers.PreTrainedModel.from_pretrained` method to load the model
configuration. Check out the :meth:`~transformers.PreTrainedModel.from_pretrained` method to load the model
weights.
weights.
...
@@ -139,7 +139,7 @@ ENCODER_DECODER_INPUTS_DOCSTRING = r"""
...
@@ -139,7 +139,7 @@ ENCODER_DECODER_INPUTS_DOCSTRING = r"""
@
add_start_docstrings
(
ENCODER_DECODER_START_DOCSTRING
)
@
add_start_docstrings
(
ENCODER_DECODER_START_DOCSTRING
)
class
EncoderDecoderModel
(
PreTrainedModel
):
class
EncoderDecoderModel
(
PreTrainedModel
):
r
"""
r
"""
:class:`~transformers.EncoderDecoder` is a generic model class that will be instantiated as a transformer
:class:`~transformers.EncoderDecoder
Model
` is a generic model class that will be instantiated as a transformer
architecture with one of the base model classes of the library as encoder and another one as decoder when created
architecture with one of the base model classes of the library as encoder and another one as decoder when created
with the :meth`~transformers.AutoModel.from_pretrained` class method for the encoder and
with the :meth`~transformers.AutoModel.from_pretrained` class method for the encoder and
:meth`~transformers.AutoModelForCausalLM.from_pretrained` class method for the decoder.
:meth`~transformers.AutoModelForCausalLM.from_pretrained` class method for the decoder.
...
...
src/transformers/models/speech_encoder_decoder/modeling_speech_encoder_decoder.py
View file @
afb07a79
...
@@ -61,7 +61,7 @@ SPEECH_ENCODER_DECODER_START_DOCSTRING = r"""
...
@@ -61,7 +61,7 @@ SPEECH_ENCODER_DECODER_START_DOCSTRING = r"""
general usage and behavior.
general usage and behavior.
Parameters:
Parameters:
config (:class:`~transformers.
Pretrained
Config`): Model configuration class with all the parameters of the model.
config (:class:`~transformers.
SpeechEncoderDecoder
Config`): Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the :meth:`~transformers.PreTrainedModel.from_pretrained` method to load the model
configuration. Check out the :meth:`~transformers.PreTrainedModel.from_pretrained` method to load the model
weights.
weights.
...
@@ -152,9 +152,9 @@ SPEECH_ENCODER_DECODER_INPUTS_DOCSTRING = r"""
...
@@ -152,9 +152,9 @@ SPEECH_ENCODER_DECODER_INPUTS_DOCSTRING = r"""
@
add_start_docstrings
(
SPEECH_ENCODER_DECODER_START_DOCSTRING
)
@
add_start_docstrings
(
SPEECH_ENCODER_DECODER_START_DOCSTRING
)
class
SpeechEncoderDecoderModel
(
PreTrainedModel
):
class
SpeechEncoderDecoderModel
(
PreTrainedModel
):
r
"""
r
"""
:class:`~transformers.EncoderDecoder` is a generic model class that will be instantiated as a
transformer
:class:`~transformers.
Speech
EncoderDecoder
Model
` is a generic model class that will be instantiated as a
architecture with one of the base model classes of the library as encoder and another one as decoder
when created
transformer
architecture with one of the base model classes of the library as encoder and another one as decoder
with the :meth`~transformers.AutoModel.from_pretrained` class method for the encoder and
when created
with the :meth`~transformers.AutoModel.from_pretrained` class method for the encoder and
:meth`~transformers.AutoModelForCausalLM.from_pretrained` class method for the decoder.
:meth`~transformers.AutoModelForCausalLM.from_pretrained` class method for the decoder.
"""
"""
config_class
=
SpeechEncoderDecoderConfig
config_class
=
SpeechEncoderDecoderConfig
...
...
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