


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


__lowerCamelCase         =			logging.get_logger(__name__)

__lowerCamelCase         =			{
    """google/efficientnet-b7""": """https://huggingface.co/google/efficientnet-b7/resolve/main/config.json""",
}


class   snake_case_ (lowercase_  ):




       """simple docstring"""






       _lowerCamelCase			    =				'''efficientnet'''



       def __init__(     self     ,lowercase = 3     ,lowercase = 600     ,lowercase = 2.0     ,lowercase = 3.1     ,lowercase = 8     ,lowercase = [3, 3, 5, 3, 5, 5, 3]     ,lowercase = [32, 16, 24, 40, 80, 112, 192]     ,lowercase = [16, 24, 40, 80, 112, 192, 320]     ,lowercase = []     ,lowercase = [1, 2, 2, 2, 1, 2, 1]     ,lowercase = [1, 2, 2, 3, 3, 4, 1]     ,lowercase = [1, 6, 6, 6, 6, 6, 6]     ,lowercase = 0.25     ,lowercase = "swish"     ,lowercase = 2560     ,lowercase = "mean"     ,lowercase = 0.02     ,lowercase = 0.001     ,lowercase = 0.99     ,lowercase = 0.5     ,lowercase = 0.2     ,**lowercase     ,):

             """simple docstring"""





             super().__init__(**lowercase)

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


class   snake_case_ (lowercase_  ):




       """simple docstring"""






       _lowerCamelCase			    =				version.parse("""1.11"""  )



       @property
       def  A_   (     self):

             """simple docstring"""





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



       @property
       def  A_   (     self):

             """simple docstring"""





             return 1E-5





def    _snake_case (       __snake_case					,  __snake_case    )     ->     str:






      '''simple docstring'''







      if a < 0 or b < 0:
            raise ValueError("the value of both inputs must be positive"    )

      UpperCAmelCase_  :	List[Any]				      =		str(bin(__snake_case    )    )[2:]  # remove the leading "0b"
      UpperCAmelCase_  :	int				      =		str(bin(__snake_case    )    )[2:]  # remove the leading "0b"

      UpperCAmelCase_  :	Optional[int]				      =		max(len(__snake_case    )					,  len(__snake_case    )    )

      return "0b" + "".join(
          str(int(char_a == "1" and char_b == "1"    )    )
          for char_a, char_b in zip(a_binary.zfill(__snake_case    )					,  b_binary.zfill(__snake_case    )    )    )


if __name__ == "__main__":
   import doctest

   doctest.testmod()
