


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


snake_case							:	Any					      =				logging.get_logger(__name__)

snake_case							:	Dict					      =				{
    '''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_       (lowerCamelCase_				):
					UpperCAmelCase__ :   Union[str, Any]   				=      '''donut-swin'''

					UpperCAmelCase__ :   List[str]   				=      {
					    '''num_attention_heads''': '''num_heads''',
					    '''num_hidden_layers''': '''num_layers''',
					}
					def __init__(				self       :Dict      ,__snake_case       :Union[str, Any]=2_24      ,__snake_case       :Optional[int]=4      ,__snake_case       :Optional[Any]=3      ,__snake_case       :List[str]=96      ,__snake_case       :Tuple=[2, 2, 6, 2]      ,__snake_case       :Optional[int]=[3, 6, 12, 24]      ,__snake_case       :Optional[Any]=7      ,__snake_case       :Dict=4.0      ,__snake_case       :Optional[int]=True      ,__snake_case       :int=0.0      ,__snake_case       :Union[str, Any]=0.0      ,__snake_case       :Optional[int]=0.1      ,__snake_case       :int="gelu"      ,__snake_case       :str=False      ,__snake_case       :Union[str, Any]=0.02      ,__snake_case       :str=1E-5      ,**__snake_case       :List[Any]      ,) ->   str:
												super().__init__(**__snake_case				)

												a__					=					image_size
												a__					=					patch_size
												a__					=					num_channels
												a__					=					embed_dim
												a__					=					depths
												a__					=					len(__snake_case				)
												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(__snake_case				) - 1)				)








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


snake_case							:	Optional[int]					      =				logging.get_logger(__name__)

snake_case							:	Union[str, Any]					      =				{
    '''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 	snake_case_       (lowerCamelCase_				):
					UpperCAmelCase__ :   Dict   				=      '''visual_bert'''
					def __init__(				self       :Optional[int]      ,__snake_case       :Any=3_05_22      ,__snake_case       :str=7_68      ,__snake_case       :Any=5_12      ,__snake_case       :Any=12      ,__snake_case       :int=12      ,__snake_case       :str=30_72      ,__snake_case       :int="gelu"      ,__snake_case       :Optional[int]=0.1      ,__snake_case       :str=0.1      ,__snake_case       :Union[str, Any]=5_12      ,__snake_case       :Tuple=2      ,__snake_case       :Union[str, Any]=0.02      ,__snake_case       :Optional[Any]=1E-12      ,__snake_case       :Optional[Any]=False      ,__snake_case       :int=True      ,__snake_case       :Any=1      ,__snake_case       :Optional[int]=0      ,__snake_case       :Tuple=2      ,**__snake_case       :Any      ,) ->   Union[str, Any]:
												super().__init__(pad_token_id=__snake_case      ,bos_token_id=__snake_case      ,eos_token_id=__snake_case      ,**__snake_case				)

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




