'''simple docstring'''




from collections import OrderedDict
from typing import List, Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


_a   :	Dict 							=   logging.get_logger(__name__)

_a   :	Optional[int] 							=   {
    "google/efficientnet-b7": "https://huggingface.co/google/efficientnet-b7/resolve/main/config.json",
}






class 		__A       (__magic_name__   ):
       snake_case       :Union[str, Any]				    =					"efficientnet"






       def __init__(      self				,     UpperCamelCase_ = 3				,     UpperCamelCase_ = 6_00				,     UpperCamelCase_ = 2.0				,     UpperCamelCase_ = 3.1				,     UpperCamelCase_ = 8				,     UpperCamelCase_ = [3, 3, 5, 3, 5, 5, 3]				,     UpperCamelCase_ = [32, 16, 24, 40, 80, 1_12, 1_92]				,     UpperCamelCase_ = [16, 24, 40, 80, 1_12, 1_92, 3_20]				,     UpperCamelCase_ = []				,     UpperCamelCase_ = [1, 2, 2, 2, 1, 2, 1]				,     UpperCamelCase_ = [1, 2, 2, 3, 3, 4, 1]				,     UpperCamelCase_ = [1, 6, 6, 6, 6, 6, 6]				,     UpperCamelCase_ = 0.2_5				,     UpperCamelCase_ = "swish"				,     UpperCamelCase_ = 25_60				,     UpperCamelCase_ = "mean"				,     UpperCamelCase_ = 0.0_2				,     UpperCamelCase_ = 0.0_0_1				,     UpperCamelCase_ = 0.9_9				,     UpperCamelCase_ = 0.5				,     UpperCamelCase_ = 0.2				,     **UpperCamelCase_				,     ):
              super().__init__(**UpperCamelCase_      )

              __UpperCAmelCase  :				List[Any]       				=		num_channels
              __UpperCAmelCase  :				Union[str, Any]       				=		image_size
              __UpperCAmelCase  :				List[Any]       				=		width_coefficient
              __UpperCAmelCase  :				Any       				=		depth_coefficient
              __UpperCAmelCase  :				Optional[Any]       				=		depth_divisor
              __UpperCAmelCase  :				Any       				=		kernel_sizes
              __UpperCAmelCase  :				str       				=		in_channels
              __UpperCAmelCase  :				Optional[Any]       				=		out_channels
              __UpperCAmelCase  :				List[str]       				=		depthwise_padding
              __UpperCAmelCase  :				List[str]       				=		strides
              __UpperCAmelCase  :				Dict       				=		num_block_repeats
              __UpperCAmelCase  :				Optional[int]       				=		expand_ratios
              __UpperCAmelCase  :				Optional[int]       				=		squeeze_expansion_ratio
              __UpperCAmelCase  :				int       				=		hidden_act
              __UpperCAmelCase  :				Any       				=		hidden_dim
              __UpperCAmelCase  :				List[Any]       				=		pooling_type
              __UpperCAmelCase  :				Union[str, Any]       				=		initializer_range
              __UpperCAmelCase  :				List[Any]       				=		batch_norm_eps
              __UpperCAmelCase  :				List[str]       				=		batch_norm_momentum
              __UpperCAmelCase  :				Optional[Any]       				=		dropout_rate
              __UpperCAmelCase  :				Optional[Any]       				=		drop_connect_rate
              __UpperCAmelCase  :				str       				=		sum(UpperCamelCase_      ) * 4






class 		__A       (__magic_name__   ):
       snake_case       :List[str]				    =					version.parse("1.11"   )






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







       @property
       def 			_snake_case						(      self      ):
              return 1E-5







'''simple docstring'''




from typing import TYPE_CHECKING

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


_a   :	Dict 							=   {"configuration_reformer": ["REFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP", "ReformerConfig"]}

try:
   if not is_sentencepiece_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _a   :	Dict 							=   ["ReformerTokenizer"]

try:
   if not is_tokenizers_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _a   :	List[Any] 							=   ["ReformerTokenizerFast"]

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _a   :	int 							=   [
       "REFORMER_PRETRAINED_MODEL_ARCHIVE_LIST",
       "ReformerAttention",
       "ReformerForMaskedLM",
       "ReformerForQuestionAnswering",
       "ReformerForSequenceClassification",
       "ReformerLayer",
       "ReformerModel",
       "ReformerModelWithLMHead",
       "ReformerPreTrainedModel",
   ]


if TYPE_CHECKING:
   from .configuration_reformer import REFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, ReformerConfig

   try:
      if not is_sentencepiece_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .tokenization_reformer import ReformerTokenizer

   try:
      if not is_tokenizers_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .tokenization_reformer_fast import ReformerTokenizerFast

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_reformer import (
          REFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
          ReformerAttention,
          ReformerForMaskedLM,
          ReformerForQuestionAnswering,
          ReformerForSequenceClassification,
          ReformerLayer,
          ReformerModel,
          ReformerModelWithLMHead,
          ReformerPreTrainedModel,
      )

else:
   import sys

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






