



"""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					=       logging.get_logger(__name__)

lowercase					=       {
    '''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__      (   A__     ):
							'''simple docstring'''







							_UpperCAmelCase   					=       '''poolformer'''






							def __init__(	self						,							snake_case=3						,							snake_case=16						,							snake_case=16						,							snake_case=3						,							snake_case=4.0						,							snake_case=[2, 2, 6, 2]						,							snake_case=[64, 128, 320, 512]						,							snake_case=[7, 3, 3, 3]						,							snake_case=[4, 2, 2, 2]						,							snake_case=[2, 1, 1, 1]						,							snake_case=4						,							snake_case=0.0						,							snake_case="gelu"						,							snake_case=True						,							snake_case=1E-5						,							snake_case=0.02						,							**snake_case						,							)      ->				Union[str, Any]:
									_UpperCAmelCase							=		num_channels
									_UpperCAmelCase							=		patch_size
									_UpperCAmelCase							=		stride
									_UpperCAmelCase							=		padding
									_UpperCAmelCase							=		pool_size
									_UpperCAmelCase							=		hidden_sizes
									_UpperCAmelCase							=		mlp_ratio
									_UpperCAmelCase							=		depths
									_UpperCAmelCase							=		patch_sizes
									_UpperCAmelCase							=		strides
									_UpperCAmelCase							=		num_encoder_blocks
									_UpperCAmelCase							=		drop_path_rate
									_UpperCAmelCase							=		hidden_act
									_UpperCAmelCase							=		use_layer_scale
									_UpperCAmelCase							=		layer_scale_init_value
									_UpperCAmelCase							=		initializer_range
									super().__init__(**_lowerCamelCase    )







class       lowercase__      (   A__     ):
							'''simple docstring'''







							_UpperCAmelCase   					=       version.parse('''1.11'''     )






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






							@property
							def 							lowerCamelCase_ (	self    )      ->				List[Any]:
									return 2E-3




"""simple docstring"""






from typing import TYPE_CHECKING

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


__SCREAMING_SNAKE_CASE							=     {
    '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:
 __SCREAMING_SNAKE_CASE							=     [
     '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

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