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


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

__snake_case       :   Tuple  		=    {
    '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 							lowercase_    (     UpperCAmelCase_ ,  UpperCAmelCase_						):
    a_             =   """convnext"""







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





     """simple docstring"""

     super().__init__(**__UpperCamelCase				)

     UpperCAmelCase_				       =					num_channels
     UpperCAmelCase_				       =					patch_size
     UpperCAmelCase_				       =					num_stages
     UpperCAmelCase_				       =					[9_6, 1_9_2, 3_8_4, 7_6_8] if hidden_sizes is None else hidden_sizes
     UpperCAmelCase_				       =					[3, 3, 9, 3] if depths is None else depths
     UpperCAmelCase_				       =					hidden_act
     UpperCAmelCase_				       =					initializer_range
     UpperCAmelCase_				       =					layer_norm_eps
     UpperCAmelCase_				       =					layer_scale_init_value
     UpperCAmelCase_				       =					drop_path_rate
     UpperCAmelCase_				       =					image_size
     UpperCAmelCase_				       =					["stem"] + [F"""stage{idx}""" for idx in range(1       ,     len(self.depths				) + 1				)]
     UpperCAmelCase_       ,       UpperCAmelCase_				       =					get_aligned_output_features_output_indices(
         out_features=__UpperCamelCase       ,     out_indices=__UpperCamelCase       ,     stage_names=self.stage_names				)


class 							lowercase_    (     UpperCAmelCase_						):
    a_             =   version.parse("""1.11"""						)







    @property
    def   lowerCamelCase_    (	self				)				->       Union[str, Any]:





     """simple docstring"""

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







    @property
    def   lowerCamelCase_    (	self				)				->       Dict:





     """simple docstring"""

     return 1e-5
'''simple docstring'''

from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_torch_available,
)


__snake_case       :   Optional[int]  		=    {
    '''configuration_gptsan_japanese''': ['''GPTSAN_JAPANESE_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''GPTSanJapaneseConfig'''],
    '''tokenization_gptsan_japanese''': ['''GPTSanJapaneseTokenizer'''],
}

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      __snake_case       :   List[Any]  		=    [
          '''GPTSAN_JAPANESE_PRETRAINED_MODEL_ARCHIVE_LIST''',
          '''GPTSanJapaneseForConditionalGeneration''',
          '''GPTSanJapaneseModel''',
          '''GPTSanJapanesePreTrainedModel''',
      ]
      __snake_case       :   Optional[int]  		=    [
          '''GPTSanJapaneseTokenizer''',
      ]


if TYPE_CHECKING:
      from .configuration_gptsan_japanese import GPTSAN_JAPANESE_PRETRAINED_CONFIG_ARCHIVE_MAP, GPTSanJapaneseConfig
      from .tokenization_gptsan_japanese import GPTSanJapaneseTokenizer

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_gptsan_japanese import (
                GPTSAN_JAPANESE_PRETRAINED_MODEL_ARCHIVE_LIST,
                GPTSanJapaneseForConditionalGeneration,
                GPTSanJapaneseModel,
                GPTSanJapanesePreTrainedModel,
            )
            from .tokenization_gptsan_japanese import GPTSanJapaneseTokenizer


else:
      import sys

      __snake_case       :   Tuple  		=    _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)
