


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


lowercase_							=							logging.get_logger(__name__)

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







class    __a						( __snake_case							):
				lowerCamelCase     :       List[str]			       ='efficientnet'







				def __init__( self      ,	UpperCAmelCase = 3      ,	UpperCAmelCase = 600      ,	UpperCAmelCase = 2.0      ,	UpperCAmelCase = 3.1      ,	UpperCAmelCase = 8      ,	UpperCAmelCase = [3, 3, 5, 3, 5, 5, 3]      ,	UpperCAmelCase = [32, 16, 24, 40, 80, 112, 192]      ,	UpperCAmelCase = [16, 24, 40, 80, 112, 192, 320]      ,	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 = 2560      ,	UpperCAmelCase = "mean"      ,	UpperCAmelCase = 0.0_2      ,	UpperCAmelCase = 0.0_0_1      ,	UpperCAmelCase = 0.9_9      ,	UpperCAmelCase = 0.5      ,	UpperCAmelCase = 0.2      ,	**UpperCAmelCase      ,	):

					'''simple docstring'''






					super().__init__(**UpperCAmelCase   )

					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(UpperCAmelCase   ) * 4







class    __a						( __snake_case							):
				lowerCamelCase     :       Optional[Any]			       =version.parse('1.11'							)







				@property
				def      lowerCamelCase_     ( self   ):

					'''simple docstring'''






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







				@property
				def      lowerCamelCase_     ( self   ):

					'''simple docstring'''






					return 1E-5



"""simple docstring"""



def      UpperCAmelCase     (       _lowercase :   Optional[Any]	)						-> Tuple:


	"""simple docstring"""




	lowerCAmelCase_      							=			len(_lowercase	)
	lowerCAmelCase_      							=			sum(_lowercase	)

	lowerCAmelCase_      							=			[[False for x in range(s + 1	)] for y in range(n + 1	)]

	for i in range(1			,   n + 1	):
		lowerCAmelCase_      							=			True

	for i in range(1			,   s + 1	):
		lowerCAmelCase_      							=			False

	for i in range(1			,   n + 1	):
		for j in range(1			,   s + 1	):
			lowerCAmelCase_      							=			dp[i][j - 1]

			if arr[i - 1] <= j:
				lowerCAmelCase_      							=			dp[i][j] or dp[i - 1][j - arr[i - 1]]

	for j in range(int(s / 2	)			,   -1			,   -1	):
		if dp[n][j] is True:
			lowerCAmelCase_      							=			s - 2 * j
			break

	return diff