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


a_    					=       logging.get_logger(__name__)

a_    					=       {
    'facebook/convnextv2-tiny-1k-224': 'https://huggingface.co/facebook/convnextv2-tiny-1k-224/resolve/main/config.json',
}





class 		_lowercase						(					snake_case_						,      snake_case_       ):
 lowercase				     =   'convnextv2'

 def __init__( self	:							Union[str, Any]   ,      snake_case	:							int=3   ,      snake_case	:							Any=4   ,      snake_case	:							str=4   ,      snake_case	:							Optional[Any]=None   ,      snake_case	:							List[Any]=None   ,      snake_case	:							List[Any]="gelu"   ,      snake_case	:							List[str]=0.02   ,      snake_case	:							List[str]=1e-12   ,      snake_case	:							List[Any]=0.0   ,      snake_case	:							str=2_2_4   ,      snake_case	:							str=None   ,      snake_case	:							Any=None   ,      **snake_case	:							int   ,      )   ->						int:

  """simple docstring"""





  super().__init__(**snake_case			)

  UpperCamelCase_					:						Dict =					num_channels
  UpperCamelCase_					:						Dict =					patch_size
  UpperCamelCase_					:						Dict =					num_stages
  UpperCamelCase_					:						List[Any] =					[9_6, 1_9_2, 3_8_4, 7_6_8] if hidden_sizes is None else hidden_sizes
  UpperCamelCase_					:						List[Any] =					[3, 3, 9, 3] if depths is None else depths
  UpperCamelCase_					:						List[str] =					hidden_act
  UpperCamelCase_					:						Dict =					initializer_range
  UpperCamelCase_					:						Optional[Any] =					layer_norm_eps
  UpperCamelCase_					:						str =					drop_path_rate
  UpperCamelCase_					:						Dict =					image_size
  UpperCamelCase_					:						Optional[Any] =					['stem'] + [f"stage{idx}" for idx in range(1   ,      len(self.depths			) + 1			)]
  UpperCamelCase_, UpperCamelCase_					:						int =					get_aligned_output_features_output_indices(
      out_features=snake_case   ,      out_indices=snake_case   ,      stage_names=self.stage_names			)




from typing import TYPE_CHECKING

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


a_    					=       {'configuration_encoder_decoder': ['EncoderDecoderConfig']}

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   a_    					=       ['EncoderDecoderModel']

try:
   if not is_tf_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   a_    					=       ['TFEncoderDecoderModel']

try:
   if not is_flax_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   a_    					=       ['FlaxEncoderDecoderModel']

if TYPE_CHECKING:
   from .configuration_encoder_decoder import EncoderDecoderConfig

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_encoder_decoder import EncoderDecoderModel

   try:
      if not is_tf_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_tf_encoder_decoder import TFEncoderDecoderModel

   try:
      if not is_flax_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_flax_encoder_decoder import FlaxEncoderDecoderModel

else:
   import sys

   a_    					=       _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)



