


from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


__A :  List[Any]    							=				{
    """configuration_funnel""": ["""FUNNEL_PRETRAINED_CONFIG_ARCHIVE_MAP""", """FunnelConfig"""],
    """convert_funnel_original_tf_checkpoint_to_pytorch""": [],
    """tokenization_funnel""": ["""FunnelTokenizer"""],
}

try:
  if not is_tokenizers_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  __A :  Dict    							=				["""FunnelTokenizerFast"""]

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  __A :  List[Any]    							=				[
      """FUNNEL_PRETRAINED_MODEL_ARCHIVE_LIST""",
      """FunnelBaseModel""",
      """FunnelForMaskedLM""",
      """FunnelForMultipleChoice""",
      """FunnelForPreTraining""",
      """FunnelForQuestionAnswering""",
      """FunnelForSequenceClassification""",
      """FunnelForTokenClassification""",
      """FunnelModel""",
      """FunnelPreTrainedModel""",
      """load_tf_weights_in_funnel""",
  ]

try:
  if not is_tf_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  __A :  List[Any]    							=				[
      """TF_FUNNEL_PRETRAINED_MODEL_ARCHIVE_LIST""",
      """TFFunnelBaseModel""",
      """TFFunnelForMaskedLM""",
      """TFFunnelForMultipleChoice""",
      """TFFunnelForPreTraining""",
      """TFFunnelForQuestionAnswering""",
      """TFFunnelForSequenceClassification""",
      """TFFunnelForTokenClassification""",
      """TFFunnelModel""",
      """TFFunnelPreTrainedModel""",
  ]


if TYPE_CHECKING:
  from .configuration_funnel import FUNNEL_PRETRAINED_CONFIG_ARCHIVE_MAP, FunnelConfig
  from .tokenization_funnel import FunnelTokenizer

  try:
    if not is_tokenizers_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .tokenization_funnel_fast import FunnelTokenizerFast

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_funnel import (
        FUNNEL_PRETRAINED_MODEL_ARCHIVE_LIST,
        FunnelBaseModel,
        FunnelForMaskedLM,
        FunnelForMultipleChoice,
        FunnelForPreTraining,
        FunnelForQuestionAnswering,
        FunnelForSequenceClassification,
        FunnelForTokenClassification,
        FunnelModel,
        FunnelPreTrainedModel,
        load_tf_weights_in_funnel,
    )

  try:
    if not is_tf_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_tf_funnel import (
        TF_FUNNEL_PRETRAINED_MODEL_ARCHIVE_LIST,
        TFFunnelBaseModel,
        TFFunnelForMaskedLM,
        TFFunnelForMultipleChoice,
        TFFunnelForPreTraining,
        TFFunnelForQuestionAnswering,
        TFFunnelForSequenceClassification,
        TFFunnelForTokenClassification,
        TFFunnelModel,
        TFFunnelPreTrainedModel,
    )

else:
  import sys

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







'''simple docstring'''






from typing import List

from ...configuration_utils import PretrainedConfig
from ...utils import logging


__A :  Dict    							=				logging.get_logger(__name__)

__A :  int    							=				{
    "snap-research/efficientformer-l1-300": (
        "https://huggingface.co/snap-research/efficientformer-l1-300/resolve/main/config.json"
    ),
}






class        __snake_case	(       _SCREAMING_SNAKE_CASE):







    """simple docstring"""



    lowercase       			= 'efficientformer'

    def __init__(       self   :  Any   ,						lowerCamelCase   :  List[int] = [3, 2, 6, 4]   ,						lowerCamelCase   :  List[int] = [48, 96, 2_24, 4_48]   ,						lowerCamelCase   :  List[bool] = [True, True, True, True]   ,						lowerCamelCase   :  int = 4_48   ,						lowerCamelCase   :  int = 32   ,						lowerCamelCase   :  int = 4   ,						lowerCamelCase   :  int = 7   ,						lowerCamelCase   :  int = 5   ,						lowerCamelCase   :  int = 8   ,						lowerCamelCase   :  int = 4   ,						lowerCamelCase   :  float = 0.0   ,						lowerCamelCase   :  int = 16   ,						lowerCamelCase   :  int = 3   ,						lowerCamelCase   :  int = 3   ,						lowerCamelCase   :  int = 3   ,						lowerCamelCase   :  int = 2   ,						lowerCamelCase   :  int = 1   ,						lowerCamelCase   :  float = 0.0   ,						lowerCamelCase   :  int = 1   ,						lowerCamelCase   :  bool = True   ,						lowerCamelCase   :  bool = True   ,						lowerCamelCase   :  float = 1E-5   ,						lowerCamelCase   :  str = "gelu"   ,						lowerCamelCase   :  float = 0.02   ,						lowerCamelCase   :  float = 1E-12   ,						lowerCamelCase   :  int = 2_24   ,						lowerCamelCase   :  float = 1E-05   ,						**lowerCamelCase   :  int   ,						)       ->  None:
      super().__init__(**lowerCamelCase		)

      lowerCAmelCase_      :				List[str]      =       hidden_act
      lowerCAmelCase_      :				List[Any]      =       hidden_dropout_prob
      lowerCAmelCase_      :				Any      =       hidden_sizes
      lowerCAmelCase_      :				List[Any]      =       num_hidden_layers
      lowerCAmelCase_      :				Union[str, Any]      =       num_attention_heads
      lowerCAmelCase_      :				Tuple      =       initializer_range
      lowerCAmelCase_      :				Union[str, Any]      =       layer_norm_eps
      lowerCAmelCase_      :				int      =       patch_size
      lowerCAmelCase_      :				List[str]      =       num_channels
      lowerCAmelCase_      :				Dict      =       depths
      lowerCAmelCase_      :				int      =       mlp_expansion_ratio
      lowerCAmelCase_      :				Optional[Any]      =       downsamples
      lowerCAmelCase_      :				Union[str, Any]      =       dim
      lowerCAmelCase_      :				Union[str, Any]      =       key_dim
      lowerCAmelCase_      :				str      =       attention_ratio
      lowerCAmelCase_      :				Tuple      =       resolution
      lowerCAmelCase_      :				Optional[Any]      =       pool_size
      lowerCAmelCase_      :				str      =       downsample_patch_size
      lowerCAmelCase_      :				Dict      =       downsample_stride
      lowerCAmelCase_      :				str      =       downsample_pad
      lowerCAmelCase_      :				str      =       drop_path_rate
      lowerCAmelCase_      :				List[Any]      =       num_metaad_blocks
      lowerCAmelCase_      :				Tuple      =       distillation
      lowerCAmelCase_      :				Optional[Any]      =       use_layer_scale
      lowerCAmelCase_      :				Dict      =       layer_scale_init_value
      lowerCAmelCase_      :				Optional[Any]      =       image_size
      lowerCAmelCase_      :				Optional[Any]      =       batch_norm_eps



