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


__lowercase							:   Union[str, Any]					=     logging.get_logger(__name__)

__lowercase							:   Optional[Any]					=     {
    '''sail/poolformer_s12''': '''https://huggingface.co/sail/poolformer_s12/resolve/main/config.json''',
    # See all PoolFormer models at https://huggingface.co/models?filter=poolformer
}

class 	__lowercase				(  _lowercase    ):
			lowerCamelCase			:		str	      =			"poolformer"

			def __init__(self			,   A=3			,   A=1_6			,   A=1_6			,   A=3			,   A=4.0			,   A=[2, 2, 6, 2]			,   A=[6_4, 1_2_8, 3_2_0, 5_1_2]			,   A=[7, 3, 3, 3]			,   A=[4, 2, 2, 2]			,   A=[2, 1, 1, 1]			,   A=4			,   A=0.0			,   A="gelu"			,   A=True			,   A=1E-5			,   A=0.02			,   **A			,   ):
								lowerCamelCase_					:      Optional[Any]     =		num_channels
								lowerCamelCase_					:      Tuple     =		patch_size
								lowerCamelCase_					:      Dict     =		stride
								lowerCamelCase_					:      Dict     =		padding
								lowerCamelCase_					:      List[str]     =		pool_size
								lowerCamelCase_					:      Dict     =		hidden_sizes
								lowerCamelCase_					:      Tuple     =		mlp_ratio
								lowerCamelCase_					:      int     =		depths
								lowerCamelCase_					:      Optional[Any]     =		patch_sizes
								lowerCamelCase_					:      Union[str, Any]     =		strides
								lowerCamelCase_					:      List[Any]     =		num_encoder_blocks
								lowerCamelCase_					:      List[str]     =		drop_path_rate
								lowerCamelCase_					:      Optional[int]     =		hidden_act
								lowerCamelCase_					:      Union[str, Any]     =		use_layer_scale
								lowerCamelCase_					:      Dict     =		layer_scale_init_value
								lowerCamelCase_					:      int     =		initializer_range
								super().__init__(**A      )

class 	__lowercase				(  _lowercase    ):
			lowerCamelCase			:		List[Any]	      =			version.parse("1.11"    )

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






			@property
			def        UpperCAmelCase__ (self      ):
								return 2E-3




'''simple docstring'''


from typing import TYPE_CHECKING

from ....utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__lowercase							:   str					=     {
    '''configuration_mctct''': ['''MCTCT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''MCTCTConfig'''],
    '''feature_extraction_mctct''': ['''MCTCTFeatureExtractor'''],
    '''processing_mctct''': ['''MCTCTProcessor'''],
}


try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					__lowercase							:   str					=     [
					    '''MCTCT_PRETRAINED_MODEL_ARCHIVE_LIST''',
					    '''MCTCTForCTC''',
					    '''MCTCTModel''',
					    '''MCTCTPreTrainedModel''',
					]


if TYPE_CHECKING:
					from .configuration_mctct import MCTCT_PRETRAINED_CONFIG_ARCHIVE_MAP, MCTCTConfig
					from .feature_extraction_mctct import MCTCTFeatureExtractor
					from .processing_mctct import MCTCTProcessor

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_mctct import MCTCT_PRETRAINED_MODEL_ARCHIVE_LIST, MCTCTForCTC, MCTCTModel, MCTCTPreTrainedModel

else:
					import sys

					__lowercase							:   Union[str, Any]					=     _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)


