




'''simple docstring'''







from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowerCAmelCase_     						=				logging.get_logger(__name__)

lowerCAmelCase_     						=				{
    '''naver-clova-ix/donut-base''': '''https://huggingface.co/naver-clova-ix/donut-base/resolve/main/config.json''',
    # See all Donut models at https://huggingface.co/models?filter=donut-swin
}

class 	_snake_case(			_UpperCAmelCase      ):
 __snake_case:							str						=					'''donut-swin'''

 __snake_case:							Dict						=					{
     '''num_attention_heads''': '''num_heads''',
     '''num_hidden_layers''': '''num_layers''',
 }






 def __init__(self       :  List[str]    ,		a       :  Dict=2_24    ,		a       :  Dict=4    ,		a       :  List[str]=3    ,		a       :  Dict=96    ,		a       :  List[Any]=[2, 2, 6, 2]    ,		a       :  Dict=[3, 6, 12, 24]    ,		a       :  Union[str, Any]=7    ,		a       :  Any=4.0    ,		a       :  Tuple=True    ,		a       :  Optional[Any]=0.0    ,		a       :  Optional[int]=0.0    ,		a       :  Any=0.1    ,		a       :  Any="gelu"    ,		a       :  str=False    ,		a       :  Any=0.02    ,		a       :  str=1e-5    ,		**a       :  Optional[Any]    ,		)       ->   List[Any]:






    """simple docstring"""


    super().__init__(**a    )

    A__       =     image_size
    A__       =     patch_size
    A__       =     num_channels
    A__       =     embed_dim
    A__       =     depths
    A__       =     len(a    )
    A__       =     num_heads
    A__       =     window_size
    A__       =     mlp_ratio
    A__       =     qkv_bias
    A__       =     hidden_dropout_prob
    A__       =     attention_probs_dropout_prob
    A__       =     drop_path_rate
    A__       =     hidden_act
    A__       =     use_absolute_embeddings
    A__       =     layer_norm_eps
    A__       =     initializer_range
    # we set the hidden_size attribute in order to make Swin work with VisionEncoderDecoderModel
    # this indicates the channel dimension after the last stage of the model
    A__       =     int(embed_dim * 2 ** (len(a    ) - 1)    )









"""simple docstring"""





from ...configuration_utils import PretrainedConfig
from ...utils import logging


SCREAMING_SNAKE_CASE__   =  logging.get_logger(__name__)

SCREAMING_SNAKE_CASE__   =  {
    "uclanlp/visualbert-vqa": "https://huggingface.co/uclanlp/visualbert-vqa/resolve/main/config.json",
    "uclanlp/visualbert-vqa-pre": "https://huggingface.co/uclanlp/visualbert-vqa-pre/resolve/main/config.json",
    "uclanlp/visualbert-vqa-coco-pre": (
        "https://huggingface.co/uclanlp/visualbert-vqa-coco-pre/resolve/main/config.json"
    ),
    "uclanlp/visualbert-vcr": "https://huggingface.co/uclanlp/visualbert-vcr/resolve/main/config.json",
    "uclanlp/visualbert-vcr-pre": "https://huggingface.co/uclanlp/visualbert-vcr-pre/resolve/main/config.json",
    "uclanlp/visualbert-vcr-coco-pre": (
        "https://huggingface.co/uclanlp/visualbert-vcr-coco-pre/resolve/main/config.json"
    ),
    "uclanlp/visualbert-nlvr2": "https://huggingface.co/uclanlp/visualbert-nlvr2/resolve/main/config.json",
    "uclanlp/visualbert-nlvr2-pre": "https://huggingface.co/uclanlp/visualbert-nlvr2-pre/resolve/main/config.json",
    "uclanlp/visualbert-nlvr2-coco-pre": (
        "https://huggingface.co/uclanlp/visualbert-nlvr2-coco-pre/resolve/main/config.json"
    )
    # See all VisualBERT models at https://huggingface.co/models?filter=visual_bert
}

class 						lowercase   (   _UpperCAmelCase   ):
      _SCREAMING_SNAKE_CASE							      = 'visual_bert'





      def __init__(			self ,		lowercase=30_522 ,		lowercase=768 ,		lowercase=512 ,		lowercase=12 ,		lowercase=12 ,		lowercase=3_072 ,		lowercase="gelu" ,		lowercase=0.1 ,		lowercase=0.1 ,		lowercase=512 ,		lowercase=2 ,		lowercase=0.02 ,		lowercase=1e-12 ,		lowercase=False ,		lowercase=True ,		lowercase=1 ,		lowercase=0 ,		lowercase=2 ,		**lowercase ,		)						->	int:
            super().__init__(pad_token_id=lowercase ,		bos_token_id=lowercase ,		eos_token_id=lowercase ,		**lowercase					)

            lowerCAmelCase    		=			vocab_size
            lowerCAmelCase    		=			max_position_embeddings
            lowerCAmelCase    		=			hidden_size
            lowerCAmelCase    		=			visual_embedding_dim
            lowerCAmelCase    		=			num_hidden_layers
            lowerCAmelCase    		=			num_attention_heads
            lowerCAmelCase    		=			intermediate_size
            lowerCAmelCase    		=			hidden_act
            lowerCAmelCase    		=			hidden_dropout_prob
            lowerCAmelCase    		=			attention_probs_dropout_prob
            lowerCAmelCase    		=			initializer_range
            lowerCAmelCase    		=			type_vocab_size
            lowerCAmelCase    		=			layer_norm_eps
            lowerCAmelCase    		=			bypass_transformer
            lowerCAmelCase    		=			special_visual_initialize






