




"""simple docstring"""




from typing import TYPE_CHECKING

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


a_        =       {
    'configuration_convnext': ['CONVNEXT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'ConvNextConfig', 'ConvNextOnnxConfig']
}

try:
			if not is_vision_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			a_        =       ['ConvNextFeatureExtractor']
			a_        =       ['ConvNextImageProcessor']

try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			a_        =       [
			    'CONVNEXT_PRETRAINED_MODEL_ARCHIVE_LIST',
			    'ConvNextForImageClassification',
			    'ConvNextModel',
			    'ConvNextPreTrainedModel',
			    'ConvNextBackbone',
			]

try:
			if not is_tf_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			a_        =       [
			    'TFConvNextForImageClassification',
			    'TFConvNextModel',
			    'TFConvNextPreTrainedModel',
			]

if TYPE_CHECKING:
			from .configuration_convnext import CONVNEXT_PRETRAINED_CONFIG_ARCHIVE_MAP, ConvNextConfig, ConvNextOnnxConfig

			try:
						if not is_vision_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .feature_extraction_convnext import ConvNextFeatureExtractor
						from .image_processing_convnext import ConvNextImageProcessor

			try:
						if not is_torch_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_convnext import (
						    CONVNEXT_PRETRAINED_MODEL_ARCHIVE_LIST,
						    ConvNextBackbone,
						    ConvNextForImageClassification,
						    ConvNextModel,
						    ConvNextPreTrainedModel,
						)

			try:
						if not is_tf_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_tf_convnext import TFConvNextForImageClassification, TFConvNextModel, TFConvNextPreTrainedModel


else:
			import sys

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




'''simple docstring'''




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


__UpperCAmelCase					=logging.get_logger(__name__)

__UpperCAmelCase					={
    "Visual-Attention-Network/van-base": (
        "https://huggingface.co/Visual-Attention-Network/van-base/blob/main/config.json"
    ),
}




class        a__ (  UpperCAmelCase__					):
     lowerCamelCase    :	Optional[Any]				="van"






     def __init__(					self						:						Union[str, Any]    ,							a						:						List[Any]=2_24    ,							a						:						Optional[int]=3    ,							a						:						Optional[Any]=[7, 3, 3, 3]    ,							a						:						int=[4, 2, 2, 2]    ,							a						:						Optional[int]=[64, 1_28, 3_20, 5_12]    ,							a						:						str=[3, 3, 12, 3]    ,							a						:						str=[8, 8, 4, 4]    ,							a						:						int="gelu"    ,							a						:						int=0.02    ,							a						:						Optional[int]=1e-6    ,							a						:						List[str]=1e-2    ,							a						:						Union[str, Any]=0.0    ,							a						:						int=0.0    ,							**a						:						Optional[Any]    ,							):





         """simple docstring"""



         super().__init__(**a       )
         __lowerCamelCase            =    image_size
         __lowerCamelCase            =    num_channels
         __lowerCamelCase            =    patch_sizes
         __lowerCamelCase            =    strides
         __lowerCamelCase            =    hidden_sizes
         __lowerCamelCase            =    depths
         __lowerCamelCase            =    mlp_ratios
         __lowerCamelCase            =    hidden_act
         __lowerCamelCase            =    initializer_range
         __lowerCamelCase            =    layer_norm_eps
         __lowerCamelCase            =    layer_scale_init_value
         __lowerCamelCase            =    drop_path_rate
         __lowerCamelCase            =    dropout_rate
