[docstring] SwinModel docstring fix (#26679)

* remove from utils

* updated doc string

* only in the model

* Update src/transformers/models/swin/modeling_swin.py

Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>

* Update src/transformers/models/swin/modeling_swin.py

Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>

---------

Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>
This commit is contained in:
Shivanand
2023-10-11 19:23:32 +05:30
committed by GitHub
parent da69de17e8
commit cc44ca8017
2 changed files with 6 additions and 1 deletions

View File

@@ -942,6 +942,12 @@ SWIN_INPUTS_DOCSTRING = r"""
@add_start_docstrings( @add_start_docstrings(
"The bare Swin Model transformer outputting raw hidden-states without any specific head on top.", "The bare Swin Model transformer outputting raw hidden-states without any specific head on top.",
SWIN_START_DOCSTRING, SWIN_START_DOCSTRING,
"""
add_pooling_layer (`bool`, *optional*, defaults to `True`):
Whether or not to apply pooling layer.
use_mask_token (`bool`, *optional*, defaults to `False`):
Whether or not to create and apply mask tokens in the embedding layer.
""",
) )
class SwinModel(SwinPreTrainedModel): class SwinModel(SwinPreTrainedModel):
def __init__(self, config, add_pooling_layer=True, use_mask_token=False): def __init__(self, config, add_pooling_layer=True, use_mask_token=False):

View File

@@ -499,7 +499,6 @@ OBJECTS_TO_IGNORE = [
"SqueezeBertTokenizerFast", "SqueezeBertTokenizerFast",
"SummarizationPipeline", "SummarizationPipeline",
"Swin2SRImageProcessor", "Swin2SRImageProcessor",
"SwinModel",
"Swinv2Model", "Swinv2Model",
"SwitchTransformersConfig", "SwitchTransformersConfig",
"T5Config", "T5Config",