From cc44ca8017b11c0086593f8666b23d4c420c5d51 Mon Sep 17 00:00:00 2001 From: Shivanand Date: Wed, 11 Oct 2023 19:23:32 +0530 Subject: [PATCH] [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> --- src/transformers/models/swin/modeling_swin.py | 6 ++++++ utils/check_docstrings.py | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/transformers/models/swin/modeling_swin.py b/src/transformers/models/swin/modeling_swin.py index 2cf1d33a51..45a7aa718c 100644 --- a/src/transformers/models/swin/modeling_swin.py +++ b/src/transformers/models/swin/modeling_swin.py @@ -942,6 +942,12 @@ SWIN_INPUTS_DOCSTRING = r""" @add_start_docstrings( "The bare Swin Model transformer outputting raw hidden-states without any specific head on top.", 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): def __init__(self, config, add_pooling_layer=True, use_mask_token=False): diff --git a/utils/check_docstrings.py b/utils/check_docstrings.py index e140be2803..f142c5dbcc 100644 --- a/utils/check_docstrings.py +++ b/utils/check_docstrings.py @@ -499,7 +499,6 @@ OBJECTS_TO_IGNORE = [ "SqueezeBertTokenizerFast", "SummarizationPipeline", "Swin2SRImageProcessor", - "SwinModel", "Swinv2Model", "SwitchTransformersConfig", "T5Config",