

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


snake_case_        =			logging.get_logger(__name__)

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


class 				SCREAMING_SNAKE_CASE__ (__snake_case		,	__snake_case					):
    __lowerCamelCase						:	Dict														=					"""convnextv2"""





    def __init__(				self						,       a=3						,       a=4						,       a=4						,       a=None						,       a=None						,       a="gelu"						,       a=0.02						,       a=1e-12						,       a=0.0						,       a=224						,       a=None						,       a=None						,       **a						,       ):
         super().__init__(**a)

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




from typing import TYPE_CHECKING

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


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

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

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

try:
       if not is_flax_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       snake_case_        =			['''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

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

