



"""simple docstring"""







from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging
from ...utils.backbone_utils import BackboneConfigMixin, get_aligned_output_features_output_indices


A    =					logging.get_logger(__name__)

A    =					{
    'facebook/convnext-tiny-224': 'https://huggingface.co/facebook/convnext-tiny-224/resolve/main/config.json',
    # See all ConvNeXT models at https://huggingface.co/models?filter=convnext
}

class 			_a     (   lowerCAmelCase_    ,  lowerCAmelCase_):
			__magic_name__    				=    'convnext'



			def __init__( self       :							Optional[int]      ,  _lowercase       :							str=3      ,  _lowercase       :							Dict=4      ,  _lowercase       :							Optional[Any]=4      ,  _lowercase       :							str=None      ,  _lowercase       :							Any=None      ,  _lowercase       :							Union[str, Any]="gelu"      ,  _lowercase       :							Any=0.02      ,  _lowercase       :							List[Any]=1E-12      ,  _lowercase       :							Optional[int]=1E-6      ,  _lowercase       :							Any=0.0      ,  _lowercase       :							Optional[Any]=224      ,  _lowercase       :							Any=None      ,  _lowercase       :							Tuple=None      ,  **_lowercase       :							int      ,  )       ->				Optional[int]:
									super().__init__(**lowerCamelCase_		)

									snake_case      : Optional[int]							=   num_channels
									snake_case      : Dict							=   patch_size
									snake_case      : Optional[int]							=   num_stages
									snake_case      : List[Any]							=   [96, 192, 384, 768] if hidden_sizes is None else hidden_sizes
									snake_case      : Optional[int]							=   [3, 3, 9, 3] if depths is None else depths
									snake_case      : str							=   hidden_act
									snake_case      : Optional[int]							=   initializer_range
									snake_case      : Optional[Any]							=   layer_norm_eps
									snake_case      : Any							=   layer_scale_init_value
									snake_case      : List[Any]							=   drop_path_rate
									snake_case      : List[Any]							=   image_size
									snake_case      : List[str]							=   ["stem"] + [F'''stage{idx}''' for idx in range(1      ,  len(self.depths		) + 1		)]
									snake_case						, snake_case      : List[Any]							=   get_aligned_output_features_output_indices(
									    out_features=lowerCamelCase_      ,  out_indices=lowerCamelCase_      ,  stage_names=self.stage_names		)



class 			_a     (   lowerCAmelCase_):
			__magic_name__    				=    version.parse("""1.11""")



			@property
			def 							__lowercase				( self       :							Optional[Any]		)       ->				Optional[Any]:
									return OrderedDict(
									    [
									        ("pixel_values", {0: "batch", 1: "num_channels", 2: "height", 3: "width"}),
									    ]		)



			@property
			def 							__lowercase				( self       :							Optional[Any]		)       ->				Dict:
									return 1E-5








"""simple docstring"""







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


A    =	logging.get_logger(__name__)

A    =	{
    'uw-madison/yoso-4096': 'https://huggingface.co/uw-madison/yoso-4096/resolve/main/config.json',
    # See all YOSO models at https://huggingface.co/models?filter=yoso
}

class 			_a     (   SCREAMING_SNAKE_CASE__):
			__magic_name__    				=    """yoso"""



			def __init__( self       :							List[str]      ,  _lowercase       :							List[str]=50265      ,  _lowercase       :							List[str]=768      ,  _lowercase       :							Optional[int]=12      ,  _lowercase       :							str=12      ,  _lowercase       :							List[Any]=3072      ,  _lowercase       :							Dict="gelu"      ,  _lowercase       :							int=0.1      ,  _lowercase       :							Optional[Any]=0.1      ,  _lowercase       :							Dict=4096      ,  _lowercase       :							Optional[Any]=1      ,  _lowercase       :							Any=0.02      ,  _lowercase       :							Union[str, Any]=1E-12      ,  _lowercase       :							int="absolute"      ,  _lowercase       :							Any=True      ,  _lowercase       :							Dict=9      ,  _lowercase       :							int=64      ,  _lowercase       :							Any=None      ,  _lowercase       :							List[str]=True      ,  _lowercase       :							Optional[Any]=True      ,  _lowercase       :							Any=1      ,  _lowercase       :							int=0      ,  _lowercase       :							List[str]=2      ,  **_lowercase       :							List[Any]      ,  )       ->				Union[str, Any]:
									super().__init__(pad_token_id=_lowercase      ,  bos_token_id=_lowercase      ,  eos_token_id=_lowercase      ,  **_lowercase		)

									snake_case      : List[str]							=   vocab_size
									snake_case      : Tuple							=   max_position_embeddings
									snake_case      : Optional[Any]							=   hidden_size
									snake_case      : Tuple							=   num_hidden_layers
									snake_case      : Tuple							=   num_attention_heads
									snake_case      : Any							=   intermediate_size
									snake_case      : Union[str, Any]							=   hidden_act
									snake_case      : int							=   hidden_dropout_prob
									snake_case      : Dict							=   attention_probs_dropout_prob
									snake_case      : Any							=   initializer_range
									snake_case      : Optional[Any]							=   type_vocab_size
									snake_case      : List[str]							=   layer_norm_eps
									snake_case      : Dict							=   position_embedding_type
									snake_case      : Tuple							=   use_expectation
									snake_case      : Dict							=   hash_code_len
									snake_case      : Optional[Any]							=   num_hash
									snake_case      : List[str]							=   conv_window
									snake_case      : Optional[Any]							=   use_fast_hash
									snake_case      : Tuple							=   lsh_backward



