





"""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


SCREAMING_SNAKE_CASE__   =  logging.get_logger(__name__)

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

class 						lowercase   (   _UpperCAmelCase   ):
      _SCREAMING_SNAKE_CASE							      = '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 = 2_560 ,		lowercase = "mean" ,		lowercase = 0.02 ,		lowercase = 0.001 ,		lowercase = 0.99 ,		lowercase = 0.5 ,		lowercase = 0.2 ,		**lowercase ,		)						->	Tuple:
            super().__init__(**lowercase					)

            lowerCAmelCase    		=			num_channels
            lowerCAmelCase    		=			image_size
            lowerCAmelCase    		=			width_coefficient
            lowerCAmelCase    		=			depth_coefficient
            lowerCAmelCase    		=			depth_divisor
            lowerCAmelCase    		=			kernel_sizes
            lowerCAmelCase    		=			in_channels
            lowerCAmelCase    		=			out_channels
            lowerCAmelCase    		=			depthwise_padding
            lowerCAmelCase    		=			strides
            lowerCAmelCase    		=			num_block_repeats
            lowerCAmelCase    		=			expand_ratios
            lowerCAmelCase    		=			squeeze_expansion_ratio
            lowerCAmelCase    		=			hidden_act
            lowerCAmelCase    		=			hidden_dim
            lowerCAmelCase    		=			pooling_type
            lowerCAmelCase    		=			initializer_range
            lowerCAmelCase    		=			batch_norm_eps
            lowerCAmelCase    		=			batch_norm_momentum
            lowerCAmelCase    		=			dropout_rate
            lowerCAmelCase    		=			drop_connect_rate
            lowerCAmelCase    		=			sum(lowercase					) * 4







class 						lowercase   (   _UpperCAmelCase   ):
      _SCREAMING_SNAKE_CASE							      = version.parse('1.11'   )





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





      @property
      def        _snake_case     (			self					)						->	float:
            return 1e-5













"""simple docstring"""





def      UpperCAmelCase__				(    SCREAMING_SNAKE_CASE	:		int				,		SCREAMING_SNAKE_CASE	:		int     ):







      '''simple docstring'''




      if a < 0 or b < 0:
            raise ValueError("""the value of both inputs must be positive"""     )
      lowerCAmelCase    		=			str(bin(SCREAMING_SNAKE_CASE     )     )[2:]  # remove the leading "0b"
      lowerCAmelCase    		=			str(bin(SCREAMING_SNAKE_CASE     )     )[2:]
      lowerCAmelCase    		=			max(len(SCREAMING_SNAKE_CASE     )				,		len(SCREAMING_SNAKE_CASE     )     )
      return "0b" + "".join(
          str(int("""1""" in (char_a, char_b)     )     )
          for char_a, char_b in zip(a_binary.zfill(SCREAMING_SNAKE_CASE     )				,		b_binary.zfill(SCREAMING_SNAKE_CASE     )     )     )


if __name__ == "__main__":
       import doctest

       doctest.testmod()






