"""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


lowercase__   			=      logging.get_logger(__name__)

lowercase__   			=      {
    '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   __snake_case			(	__lowerCAmelCase			, __lowerCAmelCase							):
      a__								=						"""convnext"""



      def __init__(		self       ,     lowercase=3       ,     lowercase=4       ,     lowercase=4       ,     lowercase=None       ,     lowercase=None       ,     lowercase="gelu"       ,     lowercase=0.02       ,     lowercase=1e-12       ,     lowercase=1e-6       ,     lowercase=0.0       ,     lowercase=2_24       ,     lowercase=None       ,     lowercase=None       ,     **lowercase       ,     )      ->     Any:





        '''simple docstring'''





        super().__init__(**lowercase)

        a__:	List[str]     				=      num_channels
        a__:	Tuple     				=      patch_size
        a__:	str     				=      num_stages
        a__:	Any     				=      [96, 1_92, 3_84, 7_68] if hidden_sizes is None else hidden_sizes
        a__:	Any     				=      [3, 3, 9, 3] if depths is None else depths
        a__:	List[Any]     				=      hidden_act
        a__:	Dict     				=      initializer_range
        a__:	int     				=      layer_norm_eps
        a__:	Optional[int]     				=      layer_scale_init_value
        a__:	Optional[int]     				=      drop_path_rate
        a__:	Union[str, Any]     				=      image_size
        a__:	List[Any]     				=      ['stem'] + [f'stage{idx}' for idx in range(1       ,     len(self.depths) + 1)]
        a__				,       a__:	Optional[int]     				=      get_aligned_output_features_output_indices(
            out_features=lowercase       ,     out_indices=lowercase       ,     stage_names=self.stage_names)







class   __snake_case			(	__lowerCAmelCase							):
      a__								=						version.parse("""1.11"""							)



      @property
      def     lowerCamelCase_  (		self)      ->     Mapping[str, Mapping[int, str]]:





        '''simple docstring'''





        return OrderedDict(
            [
                ('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'}),
            ])



      @property
      def     lowerCamelCase_  (		self)      ->     float:





        '''simple docstring'''





        return 1e-5



"""simple docstring"""
from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowercase__   			=      logging.get_logger(__name__)

lowercase__   			=      {
    'tau/splinter-base': 'https://huggingface.co/tau/splinter-base/resolve/main/config.json',
    'tau/splinter-base-qass': 'https://huggingface.co/tau/splinter-base-qass/resolve/main/config.json',
    'tau/splinter-large': 'https://huggingface.co/tau/splinter-large/resolve/main/config.json',
    'tau/splinter-large-qass': 'https://huggingface.co/tau/splinter-large-qass/resolve/main/config.json',
    # See all Splinter models at https://huggingface.co/models?filter=splinter
}




class   __snake_case			(	__lowerCAmelCase							):
      a__								=						"""splinter"""



      def __init__(		self       ,     lowercase=3_05_22       ,     lowercase=7_68       ,     lowercase=12       ,     lowercase=12       ,     lowercase=30_72       ,     lowercase="gelu"       ,     lowercase=0.1       ,     lowercase=0.1       ,     lowercase=5_12       ,     lowercase=2       ,     lowercase=0.02       ,     lowercase=1e-12       ,     lowercase=True       ,     lowercase=0       ,     lowercase=1_04       ,     **lowercase       ,     )      ->     Union[str, Any]:





        '''simple docstring'''





        super().__init__(pad_token_id=lowercase       ,     **lowercase)

        a__:	Dict     				=      vocab_size
        a__:	Dict     				=      max_position_embeddings
        a__:	Dict     				=      hidden_size
        a__:	int     				=      num_hidden_layers
        a__:	str     				=      num_attention_heads
        a__:	Dict     				=      intermediate_size
        a__:	Tuple     				=      hidden_act
        a__:	Optional[Any]     				=      hidden_dropout_prob
        a__:	List[Any]     				=      attention_probs_dropout_prob
        a__:	Tuple     				=      initializer_range
        a__:	str     				=      type_vocab_size
        a__:	Optional[Any]     				=      layer_norm_eps
        a__:	Any     				=      use_cache
        a__:	List[Any]     				=      question_token_id


