






"""simple docstring"""







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


lowerCAmelCase_	:    Tuple            =      logging.get_logger(__name__)

lowerCAmelCase_	:    Union[str, Any]            =      {
    '''microsoft/swinv2-tiny-patch4-window8-256''': (
        '''https://huggingface.co/microsoft/swinv2-tiny-patch4-window8-256/resolve/main/config.json'''
    ),
}





class   UpperCamelCase_ (       a_  ):

  '''simple docstring'''





  _A       :					Dict				=	'swinv2'

  _A       :					str				=	{
      'num_attention_heads': 'num_heads',
      'num_hidden_layers': 'num_layers',
  }



  def __init__(      self ,		snake_case__=2_24 ,		snake_case__=4 ,		snake_case__=3 ,		snake_case__=96 ,		snake_case__=[2, 2, 6, 2] ,		snake_case__=[3, 6, 12, 24] ,		snake_case__=7 ,		snake_case__=4.0 ,		snake_case__=True ,		snake_case__=0.0 ,		snake_case__=0.0 ,		snake_case__=0.1 ,		snake_case__="gelu" ,		snake_case__=False ,		snake_case__=0.02 ,		snake_case__=1e-5 ,		snake_case__=32 ,		**snake_case__ ,		)			->			List[str]:



         """simple docstring"""





         super().__init__(**snake_case__				)

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








"""simple docstring"""







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


lowerCAmelCase_	:    Any            =      logging.get_logger(__name__)

lowerCAmelCase_	:    Any            =      {
    '''google/canine-s''': '''https://huggingface.co/google/canine-s/resolve/main/config.json''',
    # See all CANINE models at https://huggingface.co/models?filter=canine
}





class   UpperCamelCase_ (       a_  ):
  _A       :					Tuple				=	'canine'



  def __init__(      self ,		snake_case__=7_68 ,		snake_case__=12 ,		snake_case__=12 ,		snake_case__=30_72 ,		snake_case__="gelu" ,		snake_case__=0.1 ,		snake_case__=0.1 ,		snake_case__=1_63_84 ,		snake_case__=16 ,		snake_case__=0.02 ,		snake_case__=1e-12 ,		snake_case__=0 ,		snake_case__=0xE_0_0_0 ,		snake_case__=0xE_0_0_1 ,		snake_case__=4 ,		snake_case__=4 ,		snake_case__=8 ,		snake_case__=1_63_84 ,		snake_case__=1_28 ,		**snake_case__ ,		)			->			int:



         """simple docstring"""





         super().__init__(pad_token_id=snake_case__ ,		bos_token_id=snake_case__ ,		eos_token_id=snake_case__ ,		**snake_case__				)

         UpperCAmelCase	    =			max_position_embeddings
         UpperCAmelCase	    =			hidden_size
         UpperCAmelCase	    =			num_hidden_layers
         UpperCAmelCase	    =			num_attention_heads
         UpperCAmelCase	    =			intermediate_size
         UpperCAmelCase	    =			hidden_act
         UpperCAmelCase	    =			hidden_dropout_prob
         UpperCAmelCase	    =			attention_probs_dropout_prob
         UpperCAmelCase	    =			initializer_range
         UpperCAmelCase	    =			type_vocab_size
         UpperCAmelCase	    =			layer_norm_eps

         # Character config:
         UpperCAmelCase	    =			downsampling_rate
         UpperCAmelCase	    =			upsampling_kernel_size
         UpperCAmelCase	    =			num_hash_functions
         UpperCAmelCase	    =			num_hash_buckets
         UpperCAmelCase	    =			local_transformer_stride
