


'''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   :    Union[str, Any]											= logging.get_logger(__name__)

__A   :    List[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   __snake_case			(  _SCREAMING_SNAKE_CASE):







    """simple docstring"""



    lowercase  					=   'poolformer'

    def __init__(  self       :    Union[str, Any]       ,		lowerCamelCase       :    List[Any]=3       ,		lowerCamelCase       :    Optional[int]=16       ,		lowerCamelCase       :    Optional[Any]=16       ,		lowerCamelCase       :    int=3       ,		lowerCamelCase       :    str=4.0       ,		lowerCamelCase       :    Dict=[2, 2, 6, 2]       ,		lowerCamelCase       :    Tuple=[64, 1_28, 3_20, 5_12]       ,		lowerCamelCase       :    Optional[Any]=[7, 3, 3, 3]       ,		lowerCamelCase       :    Union[str, Any]=[4, 2, 2, 2]       ,		lowerCamelCase       :    Tuple=[2, 1, 1, 1]       ,		lowerCamelCase       :    Optional[Any]=4       ,		lowerCamelCase       :    Any=0.0       ,		lowerCamelCase       :    Optional[Any]="gelu"       ,		lowerCamelCase       :    Optional[int]=True       ,		lowerCamelCase       :    int=1E-5       ,		lowerCamelCase       :    Any=0.02       ,		**lowerCamelCase       :    Union[str, Any]       ,		)  ->    Optional[int]:
      lowerCAmelCase_     : str     =  num_channels
      lowerCAmelCase_     : str     =  patch_size
      lowerCAmelCase_     : Tuple     =  stride
      lowerCAmelCase_     : List[str]     =  padding
      lowerCAmelCase_     : Dict     =  pool_size
      lowerCAmelCase_     : List[str]     =  hidden_sizes
      lowerCAmelCase_     : Union[str, Any]     =  mlp_ratio
      lowerCAmelCase_     : Any     =  depths
      lowerCAmelCase_     : Optional[Any]     =  patch_sizes
      lowerCAmelCase_     : Any     =  strides
      lowerCAmelCase_     : Any     =  num_encoder_blocks
      lowerCAmelCase_     : Optional[Any]     =  drop_path_rate
      lowerCAmelCase_     : Optional[Any]     =  hidden_act
      lowerCAmelCase_     : Tuple     =  use_layer_scale
      lowerCAmelCase_     : Union[str, Any]     =  layer_scale_init_value
      lowerCAmelCase_     : Optional[Any]     =  initializer_range
      super().__init__(**lowerCamelCase						)







class   __snake_case			(  _SCREAMING_SNAKE_CASE):







    """simple docstring"""



    lowercase  					=   version.parse('1.11')

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





    @property
    def __lowercase  (  self       :    Tuple						)  ->    float:
      return 2E-3







'''simple docstring'''






from typing import TYPE_CHECKING

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


__A   :    str											= {
    "configuration_roc_bert": ["ROC_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP", "RoCBertConfig"],
    "tokenization_roc_bert": ["RoCBertTokenizer"],
}

try:
  if not is_tokenizers_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  pass

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  __A   :    Optional[int]											= [
      "ROC_BERT_PRETRAINED_MODEL_ARCHIVE_LIST",
      "RoCBertForCausalLM",
      "RoCBertForMaskedLM",
      "RoCBertForMultipleChoice",
      "RoCBertForPreTraining",
      "RoCBertForQuestionAnswering",
      "RoCBertForSequenceClassification",
      "RoCBertForTokenClassification",
      "RoCBertLayer",
      "RoCBertModel",
      "RoCBertPreTrainedModel",
      "load_tf_weights_in_roc_bert",
  ]

if TYPE_CHECKING:
  from .configuration_roc_bert import ROC_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP, RoCBertConfig
  from .tokenization_roc_bert import RoCBertTokenizer

  try:
    if not is_tokenizers_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    raise OptionalDependencyNotAvailable()

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_roc_bert import (
        ROC_BERT_PRETRAINED_MODEL_ARCHIVE_LIST,
        RoCBertForCausalLM,
        RoCBertForMaskedLM,
        RoCBertForMultipleChoice,
        RoCBertForPreTraining,
        RoCBertForQuestionAnswering,
        RoCBertForSequenceClassification,
        RoCBertForTokenClassification,
        RoCBertLayer,
        RoCBertModel,
        RoCBertPreTrainedModel,
        load_tf_weights_in_roc_bert,
    )


else:
  import sys

  __A   :    Optional[int]											= _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)



