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
9931f817
Unverified
Commit
9931f817
authored
Jun 15, 2020
by
ZhuBaohe
Committed by
GitHub
Jun 14, 2020
Browse files
fix (#4976)
parent
9208f57b
Changes
34
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
21 additions
and
23 deletions
+21
-23
src/transformers/modeling_albert.py
src/transformers/modeling_albert.py
+1
-1
src/transformers/modeling_bart.py
src/transformers/modeling_bart.py
+1
-1
src/transformers/modeling_bert.py
src/transformers/modeling_bert.py
+1
-1
src/transformers/modeling_camembert.py
src/transformers/modeling_camembert.py
+1
-1
src/transformers/modeling_ctrl.py
src/transformers/modeling_ctrl.py
+1
-1
src/transformers/modeling_distilbert.py
src/transformers/modeling_distilbert.py
+1
-1
src/transformers/modeling_electra.py
src/transformers/modeling_electra.py
+1
-1
src/transformers/modeling_flaubert.py
src/transformers/modeling_flaubert.py
+1
-1
src/transformers/modeling_gpt2.py
src/transformers/modeling_gpt2.py
+1
-1
src/transformers/modeling_longformer.py
src/transformers/modeling_longformer.py
+1
-1
src/transformers/modeling_mmbt.py
src/transformers/modeling_mmbt.py
+1
-1
src/transformers/modeling_openai.py
src/transformers/modeling_openai.py
+2
-4
src/transformers/modeling_reformer.py
src/transformers/modeling_reformer.py
+1
-1
src/transformers/modeling_roberta.py
src/transformers/modeling_roberta.py
+1
-1
src/transformers/modeling_t5.py
src/transformers/modeling_t5.py
+1
-1
src/transformers/modeling_tf_albert.py
src/transformers/modeling_tf_albert.py
+1
-1
src/transformers/modeling_tf_bert.py
src/transformers/modeling_tf_bert.py
+1
-1
src/transformers/modeling_tf_camembert.py
src/transformers/modeling_tf_camembert.py
+1
-1
src/transformers/modeling_tf_ctrl.py
src/transformers/modeling_tf_ctrl.py
+1
-1
src/transformers/modeling_tf_distilbert.py
src/transformers/modeling_tf_distilbert.py
+1
-1
No files found.
src/transformers/modeling_albert.py
View file @
9931f817
...
@@ -423,7 +423,7 @@ ALBERT_INPUTS_DOCSTRING = r"""
...
@@ -423,7 +423,7 @@ ALBERT_INPUTS_DOCSTRING = r"""
Optionally, instead of passing :obj:`input_ids` you can choose to directly pass an embedded representation.
Optionally, instead of passing :obj:`input_ids` you can choose to directly pass an embedded representation.
This is useful if you want more control over how to convert `input_ids` indices into associated vectors
This is useful if you want more control over how to convert `input_ids` indices into associated vectors
than the model's internal embedding lookup matrix.
than the model's internal embedding lookup matrix.
output_attentions (:obj:`bool`, `optional`, defaults to
`
:obj:`None`):
output_attentions (:obj:`bool`, `optional`, defaults to :obj:`None`):
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
"""
"""
...
...
src/transformers/modeling_bart.py
View file @
9931f817
...
@@ -90,7 +90,7 @@ BART_INPUTS_DOCSTRING = r"""
...
@@ -90,7 +90,7 @@ BART_INPUTS_DOCSTRING = r"""
Default behavior: generate a tensor that ignores pad tokens in decoder_input_ids. Causal mask will also be used by default.
Default behavior: generate a tensor that ignores pad tokens in decoder_input_ids. Causal mask will also be used by default.
If you want to change padding behavior, you should read :func:`~transformers.modeling_bart._prepare_decoder_inputs` and modify.
If you want to change padding behavior, you should read :func:`~transformers.modeling_bart._prepare_decoder_inputs` and modify.
See diagram 1 in the paper for more info on the default strategy
See diagram 1 in the paper for more info on the default strategy
output_attentions (:obj:`bool`, `optional`, defaults to
`
:obj:`None`):
output_attentions (:obj:`bool`, `optional`, defaults to :obj:`None`):
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
"""
"""
...
...
src/transformers/modeling_bert.py
View file @
9931f817
...
@@ -594,7 +594,7 @@ BERT_INPUTS_DOCSTRING = r"""
...
@@ -594,7 +594,7 @@ BERT_INPUTS_DOCSTRING = r"""
is used in the cross-attention if the model is configured as a decoder.
is used in the cross-attention if the model is configured as a decoder.
Mask values selected in ``[0, 1]``:
Mask values selected in ``[0, 1]``:
``1`` for tokens that are NOT MASKED, ``0`` for MASKED tokens.
``1`` for tokens that are NOT MASKED, ``0`` for MASKED tokens.
output_attentions (:obj:`bool`, `optional`, defaults to
`
:obj:`None`):
output_attentions (:obj:`bool`, `optional`, defaults to :obj:`None`):
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
"""
"""
...
...
src/transformers/modeling_camembert.py
View file @
9931f817
...
@@ -49,7 +49,7 @@ CAMEMBERT_START_DOCSTRING = r"""
...
@@ -49,7 +49,7 @@ CAMEMBERT_START_DOCSTRING = r"""
model. Initializing with a config file does not load the weights associated with the model, only the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration.
configuration.
Check out the :meth:`~transformers.PreTrainedModel.from_pretrained` method to load the model weights.
Check out the :meth:`~transformers.PreTrainedModel.from_pretrained` method to load the model weights.
output_attentions (:obj:`bool`, `optional`, defaults to
`
:obj:`None`):
output_attentions (:obj:`bool`, `optional`, defaults to :obj:`None`):
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
"""
"""
...
...
src/transformers/modeling_ctrl.py
View file @
9931f817
...
@@ -284,7 +284,7 @@ CTRL_INPUTS_DOCSTRING = r"""
...
@@ -284,7 +284,7 @@ CTRL_INPUTS_DOCSTRING = r"""
use_cache (:obj:`bool`):
use_cache (:obj:`bool`):
If `use_cache` is True, `past` key value states are returned and
If `use_cache` is True, `past` key value states are returned and
can be used to speed up decoding (see `past`). Defaults to `True`.
can be used to speed up decoding (see `past`). Defaults to `True`.
output_attentions (:obj:`bool`, `optional`, defaults to
`
:obj:`None`):
output_attentions (:obj:`bool`, `optional`, defaults to :obj:`None`):
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
"""
"""
...
...
src/transformers/modeling_distilbert.py
View file @
9931f817
...
@@ -377,7 +377,7 @@ DISTILBERT_INPUTS_DOCSTRING = r"""
...
@@ -377,7 +377,7 @@ DISTILBERT_INPUTS_DOCSTRING = r"""
Optionally, instead of passing :obj:`input_ids` you can choose to directly pass an embedded representation.
Optionally, instead of passing :obj:`input_ids` you can choose to directly pass an embedded representation.
This is useful if you want more control over how to convert `input_ids` indices into associated vectors
This is useful if you want more control over how to convert `input_ids` indices into associated vectors
than the model's internal embedding lookup matrix.
than the model's internal embedding lookup matrix.
output_attentions (:obj:`bool`, `optional`, defaults to
`
:obj:`None`):
output_attentions (:obj:`bool`, `optional`, defaults to :obj:`None`):
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
"""
"""
...
...
src/transformers/modeling_electra.py
View file @
9931f817
...
@@ -220,7 +220,7 @@ ELECTRA_INPUTS_DOCSTRING = r"""
...
@@ -220,7 +220,7 @@ ELECTRA_INPUTS_DOCSTRING = r"""
is used in the cross-attention if the model is configured as a decoder.
is used in the cross-attention if the model is configured as a decoder.
Mask values selected in ``[0, 1]``:
Mask values selected in ``[0, 1]``:
``1`` for tokens that are NOT MASKED, ``0`` for MASKED tokens.
``1`` for tokens that are NOT MASKED, ``0`` for MASKED tokens.
output_attentions (:obj:`bool`, `optional`, defaults to
`
:obj:`None`):
output_attentions (:obj:`bool`, `optional`, defaults to :obj:`None`):
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
"""
"""
...
...
src/transformers/modeling_flaubert.py
View file @
9931f817
...
@@ -100,7 +100,7 @@ FLAUBERT_INPUTS_DOCSTRING = r"""
...
@@ -100,7 +100,7 @@ FLAUBERT_INPUTS_DOCSTRING = r"""
Optionally, instead of passing :obj:`input_ids` you can choose to directly pass an embedded representation.
Optionally, instead of passing :obj:`input_ids` you can choose to directly pass an embedded representation.
This is useful if you want more control over how to convert `input_ids` indices into associated vectors
This is useful if you want more control over how to convert `input_ids` indices into associated vectors
than the model's internal embedding lookup matrix.
than the model's internal embedding lookup matrix.
output_attentions (:obj:`bool`, `optional`, defaults to
`
:obj:`None`):
output_attentions (:obj:`bool`, `optional`, defaults to :obj:`None`):
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
"""
"""
...
...
src/transformers/modeling_gpt2.py
View file @
9931f817
...
@@ -335,7 +335,7 @@ GPT2_INPUTS_DOCSTRING = r"""
...
@@ -335,7 +335,7 @@ GPT2_INPUTS_DOCSTRING = r"""
If `past` is used, optionally only the last `inputs_embeds` have to be input (see `past`).
If `past` is used, optionally only the last `inputs_embeds` have to be input (see `past`).
use_cache (:obj:`bool`):
use_cache (:obj:`bool`):
If `use_cache` is True, `past` key value states are returned and can be used to speed up decoding (see `past`). Defaults to `True`.
If `use_cache` is True, `past` key value states are returned and can be used to speed up decoding (see `past`). Defaults to `True`.
output_attentions (:obj:`bool`, `optional`, defaults to
`
:obj:`None`):
output_attentions (:obj:`bool`, `optional`, defaults to :obj:`None`):
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
"""
"""
...
...
src/transformers/modeling_longformer.py
View file @
9931f817
...
@@ -487,7 +487,7 @@ LONGFORMER_INPUTS_DOCSTRING = r"""
...
@@ -487,7 +487,7 @@ LONGFORMER_INPUTS_DOCSTRING = r"""
Optionally, instead of passing :obj:`input_ids` you can choose to directly pass an embedded representation.
Optionally, instead of passing :obj:`input_ids` you can choose to directly pass an embedded representation.
This is useful if you want more control over how to convert `input_ids` indices into associated vectors
This is useful if you want more control over how to convert `input_ids` indices into associated vectors
than the model's internal embedding lookup matrix.
than the model's internal embedding lookup matrix.
output_attentions (:obj:`bool`, `optional`, defaults to
`
:obj:`None`):
output_attentions (:obj:`bool`, `optional`, defaults to :obj:`None`):
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
"""
"""
...
...
src/transformers/modeling_mmbt.py
View file @
9931f817
...
@@ -141,7 +141,7 @@ MMBT_INPUTS_DOCSTRING = r""" Inputs:
...
@@ -141,7 +141,7 @@ MMBT_INPUTS_DOCSTRING = r""" Inputs:
is used in the cross-attention if the model is configured as a decoder.
is used in the cross-attention if the model is configured as a decoder.
Mask values selected in ``[0, 1]``:
Mask values selected in ``[0, 1]``:
``1`` for tokens that are NOT MASKED, ``0`` for MASKED tokens.
``1`` for tokens that are NOT MASKED, ``0`` for MASKED tokens.
output_attentions (:obj:`bool`, `optional`, defaults to
`
:obj:`None`):
output_attentions (:obj:`bool`, `optional`, defaults to :obj:`None`):
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
"""
"""
...
...
src/transformers/modeling_openai.py
View file @
9931f817
...
@@ -322,9 +322,7 @@ OPENAI_GPT_INPUTS_DOCSTRING = r"""
...
@@ -322,9 +322,7 @@ OPENAI_GPT_INPUTS_DOCSTRING = r"""
Optionally, instead of passing :obj:`input_ids` you can choose to directly pass an embedded representation.
Optionally, instead of passing :obj:`input_ids` you can choose to directly pass an embedded representation.
This is useful if you want more control over how to convert `input_ids` indices into associated vectors
This is useful if you want more control over how to convert `input_ids` indices into associated vectors
than the model's internal embedding lookup matrix.
than the model's internal embedding lookup matrix.
output_attentions (:obj:`bool`, `optional`, defaults to :obj:`False`):
output_attentions (:obj:`bool`, `optional`, defaults to :obj:`None`):
Should the model returns attentions weights.
output_attentions (:obj:`bool`, `optional`, defaults to `:obj:`None`):
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
"""
"""
...
@@ -607,7 +605,7 @@ class OpenAIGPTDoubleHeadsModel(OpenAIGPTPreTrainedModel):
...
@@ -607,7 +605,7 @@ class OpenAIGPTDoubleHeadsModel(OpenAIGPTPreTrainedModel):
r
"""
r
"""
mc_token_ids (:obj:`torch.LongTensor` of shape :obj:`(batch_size, num_choices)`, `optional`, default to index of the last token of the input)
mc_token_ids (:obj:`torch.LongTensor` of shape :obj:`(batch_size, num_choices)`, `optional`, default to index of the last token of the input)
Index of the classification token in each input sequence.
Index of the classification token in each input sequence.
Selected in the range ``[0, input_ids.size(-1) - 1
[
``.
Selected in the range ``[0, input_ids.size(-1) - 1
]
``.
labels (:obj:`torch.LongTensor` of shape :obj:`(batch_size, sequence_length)`, `optional`, defaults to :obj:`None`)
labels (:obj:`torch.LongTensor` of shape :obj:`(batch_size, sequence_length)`, `optional`, defaults to :obj:`None`)
Labels for language modeling.
Labels for language modeling.
Note that the labels **are shifted** inside the model, i.e. you can set ``labels = input_ids``
Note that the labels **are shifted** inside the model, i.e. you can set ``labels = input_ids``
...
...
src/transformers/modeling_reformer.py
View file @
9931f817
...
@@ -1505,7 +1505,7 @@ REFORMER_INPUTS_DOCSTRING = r"""
...
@@ -1505,7 +1505,7 @@ REFORMER_INPUTS_DOCSTRING = r"""
bucketing. Setting `num_hashes` overwrites the default `num_hashes` defined
bucketing. Setting `num_hashes` overwrites the default `num_hashes` defined
in `config.num_hashes`.
in `config.num_hashes`.
For more information, see `num_hashes` in :class:`transformers.ReformerConfig`.
For more information, see `num_hashes` in :class:`transformers.ReformerConfig`.
output_attentions (:obj:`bool`, `optional`, defaults to
`
:obj:`None`):
output_attentions (:obj:`bool`, `optional`, defaults to :obj:`None`):
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
"""
"""
...
...
src/transformers/modeling_roberta.py
View file @
9931f817
...
@@ -130,7 +130,7 @@ ROBERTA_INPUTS_DOCSTRING = r"""
...
@@ -130,7 +130,7 @@ ROBERTA_INPUTS_DOCSTRING = r"""
Optionally, instead of passing :obj:`input_ids` you can choose to directly pass an embedded representation.
Optionally, instead of passing :obj:`input_ids` you can choose to directly pass an embedded representation.
This is useful if you want more control over how to convert `input_ids` indices into associated vectors
This is useful if you want more control over how to convert `input_ids` indices into associated vectors
than the model's internal embedding lookup matrix.
than the model's internal embedding lookup matrix.
output_attentions (:obj:`bool`, `optional`, defaults to
`
:obj:`None`):
output_attentions (:obj:`bool`, `optional`, defaults to :obj:`None`):
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
"""
"""
...
...
src/transformers/modeling_t5.py
View file @
9931f817
...
@@ -841,7 +841,7 @@ T5_INPUTS_DOCSTRING = r"""
...
@@ -841,7 +841,7 @@ T5_INPUTS_DOCSTRING = r"""
Mask to nullify selected heads of the self-attention modules.
Mask to nullify selected heads of the self-attention modules.
Mask values selected in ``[0, 1]``:
Mask values selected in ``[0, 1]``:
``1`` indicates the head is **not masked**, ``0`` indicates the head is **masked**.
``1`` indicates the head is **not masked**, ``0`` indicates the head is **masked**.
output_attentions (:obj:`bool`, `optional`, defaults to
`
:obj:`None`):
output_attentions (:obj:`bool`, `optional`, defaults to :obj:`None`):
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
"""
"""
...
...
src/transformers/modeling_tf_albert.py
View file @
9931f817
...
@@ -688,7 +688,7 @@ ALBERT_INPUTS_DOCSTRING = r"""
...
@@ -688,7 +688,7 @@ ALBERT_INPUTS_DOCSTRING = r"""
training (:obj:`boolean`, `optional`, defaults to :obj:`False`):
training (:obj:`boolean`, `optional`, defaults to :obj:`False`):
Whether to activate dropout modules (if set to :obj:`True`) during training or to de-activate them
Whether to activate dropout modules (if set to :obj:`True`) during training or to de-activate them
(if set to :obj:`False`) for evaluation.
(if set to :obj:`False`) for evaluation.
output_attentions (:obj:`bool`, `optional`, defaults to
`
:obj:`None`):
output_attentions (:obj:`bool`, `optional`, defaults to :obj:`None`):
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
"""
"""
...
...
src/transformers/modeling_tf_bert.py
View file @
9931f817
...
@@ -682,7 +682,7 @@ BERT_INPUTS_DOCSTRING = r"""
...
@@ -682,7 +682,7 @@ BERT_INPUTS_DOCSTRING = r"""
training (:obj:`boolean`, `optional`, defaults to :obj:`False`):
training (:obj:`boolean`, `optional`, defaults to :obj:`False`):
Whether to activate dropout modules (if set to :obj:`True`) during training or to de-activate them
Whether to activate dropout modules (if set to :obj:`True`) during training or to de-activate them
(if set to :obj:`False`) for evaluation.
(if set to :obj:`False`) for evaluation.
output_attentions (:obj:`bool`, `optional`, defaults to
`
:obj:`None`):
output_attentions (:obj:`bool`, `optional`, defaults to :obj:`None`):
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
"""
"""
...
...
src/transformers/modeling_tf_camembert.py
View file @
9931f817
...
@@ -62,7 +62,7 @@ CAMEMBERT_START_DOCSTRING = r"""
...
@@ -62,7 +62,7 @@ CAMEMBERT_START_DOCSTRING = r"""
config (:class:`~transformers.CamembertConfig`): Model configuration class with all the parameters of the
config (:class:`~transformers.CamembertConfig`): 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 configuration.
model. 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 weights.
Check out the :meth:`~transformers.PreTrainedModel.from_pretrained` method to load the model weights.
output_attentions (:obj:`bool`, `optional`, defaults to
`
:obj:`None`):
output_attentions (:obj:`bool`, `optional`, defaults to :obj:`None`):
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
"""
"""
...
...
src/transformers/modeling_tf_ctrl.py
View file @
9931f817
...
@@ -464,7 +464,7 @@ CTRL_INPUTS_DOCSTRING = r"""
...
@@ -464,7 +464,7 @@ CTRL_INPUTS_DOCSTRING = r"""
training (:obj:`boolean`, `optional`, defaults to :obj:`False`):
training (:obj:`boolean`, `optional`, defaults to :obj:`False`):
Whether to activate dropout modules (if set to :obj:`True`) during training or to de-activate them
Whether to activate dropout modules (if set to :obj:`True`) during training or to de-activate them
(if set to :obj:`False`) for evaluation.
(if set to :obj:`False`) for evaluation.
output_attentions (:obj:`bool`, `optional`, defaults to
`
:obj:`None`):
output_attentions (:obj:`bool`, `optional`, defaults to :obj:`None`):
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
"""
"""
...
...
src/transformers/modeling_tf_distilbert.py
View file @
9931f817
...
@@ -549,7 +549,7 @@ DISTILBERT_INPUTS_DOCSTRING = r"""
...
@@ -549,7 +549,7 @@ DISTILBERT_INPUTS_DOCSTRING = r"""
Whether to activate dropout modules (if set to :obj:`True`) during training or to de-activate them
Whether to activate dropout modules (if set to :obj:`True`) during training or to de-activate them
(if set to :obj:`False`) for evaluation.
(if set to :obj:`False`) for evaluation.
output_attentions (:obj:`bool`, `optional`, defaults to
`
:obj:`None`):
output_attentions (:obj:`bool`, `optional`, defaults to :obj:`None`):
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
If set to ``True``, the attentions tensors of all attention layers are returned. See ``attentions`` under returned tensors for more detail.
"""
"""
...
...
Prev
1
2
Next
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