mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
Apply type correction to TFSwinModelOutput
(#18295)
Signed-off-by: Seunghwan Hong <seunghwan@scatterlab.co.kr>
This commit is contained in:
parent
ccd4180f8a
commit
e318cda9ee
@ -103,7 +103,7 @@ class SwinModelOutput(ModelOutput):
|
||||
Args:
|
||||
last_hidden_state (`torch.FloatTensor` of shape `(batch_size, sequence_length, hidden_size)`):
|
||||
Sequence of hidden-states at the output of the last layer of the model.
|
||||
pooler_output (`torch.FloatTensor` of shape `(batch_size, hidden_size)`):
|
||||
pooler_output (`torch.FloatTensor` of shape `(batch_size, hidden_size)`, *optional*, returned when `add_pooling_layer=True` is passed):
|
||||
Average pooling of the last layer hidden-state.
|
||||
hidden_states (`tuple(torch.FloatTensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
|
||||
Tuple of `torch.FloatTensor` (one for the output of the embeddings + one for the output of each stage) of
|
||||
@ -125,7 +125,7 @@ class SwinModelOutput(ModelOutput):
|
||||
"""
|
||||
|
||||
last_hidden_state: torch.FloatTensor = None
|
||||
pooler_output: torch.FloatTensor = None
|
||||
pooler_output: Optional[torch.FloatTensor] = None
|
||||
hidden_states: Optional[Tuple[torch.FloatTensor]] = None
|
||||
attentions: Optional[Tuple[torch.FloatTensor]] = None
|
||||
reshaped_hidden_states: Optional[Tuple[torch.FloatTensor]] = None
|
||||
|
@ -108,7 +108,7 @@ class TFSwinModelOutput(ModelOutput):
|
||||
Args:
|
||||
last_hidden_state (`tf.Tensor` of shape `(batch_size, sequence_length, hidden_size)`):
|
||||
Sequence of hidden-states at the output of the last layer of the model.
|
||||
pooler_output (`tf.Tensor` of shape `(batch_size, hidden_size)`):
|
||||
pooler_output (`tf.Tensor` of shape `(batch_size, hidden_size)`, *optional*, returned when `add_pooling_layer=True` is passed):
|
||||
Average pooling of the last layer hidden-state.
|
||||
hidden_states (`tuple(tf.Tensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
|
||||
Tuple of `tf.Tensor` (one for the output of the embeddings + one for the output of each stage) of shape
|
||||
@ -130,7 +130,7 @@ class TFSwinModelOutput(ModelOutput):
|
||||
"""
|
||||
|
||||
last_hidden_state: tf.Tensor = None
|
||||
pooler_output: tf.Tensor = None
|
||||
pooler_output: Optional[tf.Tensor] = None
|
||||
hidden_states: Optional[Tuple[tf.Tensor]] = None
|
||||
attentions: Optional[Tuple[tf.Tensor]] = None
|
||||
reshaped_hidden_states: Optional[Tuple[tf.Tensor]] = None
|
||||
|
Loading…
Reference in New Issue
Block a user