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


_A								=   logging.get_logger(__name__)

_A								=   {
    '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       UpperCAmelCase__  (       _snake_case			):






   """simple docstring"""
   A							:       Dict     =    '''poolformer'''
   def __init__(self       ,				_a=3       ,				_a=16       ,				_a=16       ,				_a=3       ,				_a=4.0       ,				_a=[2, 2, 6, 2]       ,				_a=[64, 128, 320, 512]       ,				_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       ,				)    ->     str:
        lowercase_					:       Dict     				=					num_channels
        lowercase_					:       List[Any]     				=					patch_size
        lowercase_					:       Optional[int]     				=					stride
        lowercase_					:       Any     				=					padding
        lowercase_					:       Tuple     				=					pool_size
        lowercase_					:       Dict     				=					hidden_sizes
        lowercase_					:       Optional[Any]     				=					mlp_ratio
        lowercase_					:       str     				=					depths
        lowercase_					:       Optional[Any]     				=					patch_sizes
        lowercase_					:       Dict     				=					strides
        lowercase_					:       Optional[int]     				=					num_encoder_blocks
        lowercase_					:       Any     				=					drop_path_rate
        lowercase_					:       Dict     				=					hidden_act
        lowercase_					:       Union[str, Any]     				=					use_layer_scale
        lowercase_					:       Any     				=					layer_scale_init_value
        lowercase_					:       Union[str, Any]     				=					initializer_range
        super().__init__(**_a				)



class       UpperCAmelCase__  (       _snake_case			):






   """simple docstring"""
   A							:       List[str]     =    version.parse('''1.11'''			)
   @property
   def 		_lowerCamelCase (self				)    ->     Mapping[str, Mapping[int, str]]:
        return OrderedDict(
            [
                ('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'}),
            ]				)





   @property
   def 		_lowerCamelCase (self				)    ->     float:
        return 2e-3





'''simple docstring'''




from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_A								=   {
    'configuration_bigbird_pegasus': [
        'BIGBIRD_PEGASUS_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'BigBirdPegasusConfig',
        'BigBirdPegasusOnnxConfig',
    ],
}

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 _A								=   [
     'BIGBIRD_PEGASUS_PRETRAINED_MODEL_ARCHIVE_LIST',
     'BigBirdPegasusForCausalLM',
     'BigBirdPegasusForConditionalGeneration',
     'BigBirdPegasusForQuestionAnswering',
     'BigBirdPegasusForSequenceClassification',
     'BigBirdPegasusModel',
     'BigBirdPegasusPreTrainedModel',
 ]


if TYPE_CHECKING:
 from .configuration_bigbird_pegasus import (
     BIGBIRD_PEGASUS_PRETRAINED_CONFIG_ARCHIVE_MAP,
     BigBirdPegasusConfig,
     BigBirdPegasusOnnxConfig,
 )

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_bigbird_pegasus import (
      BIGBIRD_PEGASUS_PRETRAINED_MODEL_ARCHIVE_LIST,
      BigBirdPegasusForCausalLM,
      BigBirdPegasusForConditionalGeneration,
      BigBirdPegasusForQuestionAnswering,
      BigBirdPegasusForSequenceClassification,
      BigBirdPegasusModel,
      BigBirdPegasusPreTrainedModel,
  )


else:
 import sys

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




