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

A__   :					int							=   {
    '''google/efficientnet-b7''': '''https://huggingface.co/google/efficientnet-b7/resolve/main/config.json''',
}


class 			__magic_name__       (       a__ ):
       UpperCamelCase_   =		"""efficientnet"""
       def __init__(     self ,				A_ = 3 ,				A_ = 600 ,				A_ = 2.0 ,				A_ = 3.1 ,				A_ = 8 ,				A_ = [3, 3, 5, 3, 5, 5, 3] ,				A_ = [32, 16, 24, 40, 80, 112, 192] ,				A_ = [16, 24, 40, 80, 112, 192, 320] ,				A_ = [] ,				A_ = [1, 2, 2, 2, 1, 2, 1] ,				A_ = [1, 2, 2, 3, 3, 4, 1] ,				A_ = [1, 6, 6, 6, 6, 6, 6] ,				A_ = 0.25 ,				A_ = "swish" ,				A_ = 2560 ,				A_ = "mean" ,				A_ = 0.02 ,				A_ = 0.0_01 ,				A_ = 0.99 ,				A_ = 0.5 ,				A_ = 0.2 ,				**A_ ,				)     ->	Dict:





         """simple docstring"""




         super().__init__(**lowerCAmelCase__       )

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


class 			__magic_name__       (       a__ ):
       UpperCamelCase_   =		version.parse('''1.11''' )
       @property
       def 							lowercase_							(     self       )     ->	Mapping[str, Mapping[int, str]]:





         """simple docstring"""




         return OrderedDict(
             [
                 ('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''}),
             ]       )



       @property
       def 							lowercase_							(     self       )     ->	float:





         """simple docstring"""




         return 1E-5


"""simple docstring"""




def  _lowerCAmelCase		(		_UpperCamelCase						):






  """simple docstring"""



  if not isinstance(_UpperCamelCase ,				_UpperCamelCase						):
    raise ValueError('''Input series is not valid, valid series - [2, 4, 6]'''						)
  if len(_UpperCamelCase						) == 0:
    raise ValueError('''Input list must be a non empty list'''						)
  if len(_UpperCamelCase						) == 1:
    return True
  _lowercase:			Any       =     series[1] - series[0]
  for index in range(len(_UpperCamelCase						) - 1						):
    if series[index + 1] - series[index] != common_diff:
      return False
  return True




def  _lowerCAmelCase		(		_UpperCamelCase						):






  """simple docstring"""



  if not isinstance(_UpperCamelCase ,				_UpperCamelCase						):
    raise ValueError('''Input series is not valid, valid series - [2, 4, 6]'''						)
  if len(_UpperCamelCase						) == 0:
    raise ValueError('''Input list must be a non empty list'''						)
  _lowercase:			Tuple       =     0
  for val in series:
    answer += val
  return answer / len(_UpperCamelCase						)


if __name__ == "__main__":
  import doctest

  doctest.testmod()
