




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


_snake_case            = logging.get_logger(__name__)

_snake_case            = {
    "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							(     _snake_case	):
     _a											=		'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	,  )		->							Optional[int]:
           _A							:  Optional[Any]    =		num_channels
           _A							:  Dict    =		patch_size
           _A							:  Tuple    =		stride
           _A							:  Dict    =		padding
           _A							:  List[str]    =		pool_size
           _A							:  List[Any]    =		hidden_sizes
           _A							:  Optional[int]    =		mlp_ratio
           _A							:  Tuple    =		depths
           _A							:  int    =		patch_sizes
           _A							:  List[str]    =		strides
           _A							:  Dict    =		num_encoder_blocks
           _A							:  Tuple    =		drop_path_rate
           _A							:  Any    =		hidden_act
           _A							:  Tuple    =		use_layer_scale
           _A							:  Optional[Any]    =		layer_scale_init_value
           _A							:  Tuple    =		initializer_range
           super().__init__(**_a       )







class 		lowercase							(     _snake_case	):
     _a											=		version.parse("1.11"	)

     @property
     def       a__			(						self       )		->							int:
           return OrderedDict(
               [
                   ("""pixel_values""", {0: """batch""", 1: """num_channels""", 2: """height""", 3: """width"""}),
               ]       )



     @property
     def       a__			(						self       )		->							List[str]:
           return 2e-3







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_snake_case            = {
    "configuration_time_series_transformer": [
        "TIME_SERIES_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "TimeSeriesTransformerConfig",
    ],
}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  _snake_case            = [
      "TIME_SERIES_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST",
      "TimeSeriesTransformerForPrediction",
      "TimeSeriesTransformerModel",
      "TimeSeriesTransformerPreTrainedModel",
  ]


if TYPE_CHECKING:
  from .configuration_time_series_transformer import (
      TIME_SERIES_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
      TimeSeriesTransformerConfig,
  )

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_time_series_transformer import (
        TIME_SERIES_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
        TimeSeriesTransformerForPrediction,
        TimeSeriesTransformerModel,
        TimeSeriesTransformerPreTrainedModel,
    )

else:
  import sys

  _snake_case            = _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)

