






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


lowerCAmelCase__          =						logging.get_logger(__name__)

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

class       __lowercase					(__lowerCamelCase    ):
	_lowerCamelCase              =  '''efficientnet'''

	def __init__(      self   :						Any  ,					UpperCAmelCase_   :						int = 3  ,					UpperCAmelCase_   :						int = 600  ,					UpperCAmelCase_   :						float = 2.0  ,					UpperCAmelCase_   :						float = 3.1  ,					UpperCAmelCase_   :						int = 8  ,					UpperCAmelCase_   :						List[int] = [3, 3, 5, 3, 5, 5, 3]  ,					UpperCAmelCase_   :						List[int] = [32, 16, 24, 40, 80, 112, 192]  ,					UpperCAmelCase_   :						List[int] = [16, 24, 40, 80, 112, 192, 320]  ,					UpperCAmelCase_   :						List[int] = []  ,					UpperCAmelCase_   :						List[int] = [1, 2, 2, 2, 1, 2, 1]  ,					UpperCAmelCase_   :						List[int] = [1, 2, 2, 3, 3, 4, 1]  ,					UpperCAmelCase_   :						List[int] = [1, 6, 6, 6, 6, 6, 6]  ,					UpperCAmelCase_   :						float = 0.25  ,					UpperCAmelCase_   :						str = "swish"  ,					UpperCAmelCase_   :						int = 2_560  ,					UpperCAmelCase_   :						str = "mean"  ,					UpperCAmelCase_   :						float = 0.02  ,					UpperCAmelCase_   :						float = 0.0_01  ,					UpperCAmelCase_   :						float = 0.99  ,					UpperCAmelCase_   :						float = 0.5  ,					UpperCAmelCase_   :						float = 0.2  ,					**UpperCAmelCase_   :						int  ,					):
			super().__init__(**UpperCAmelCase_)

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


class       __lowercase					(__lowerCamelCase    ):
	_lowerCamelCase              =  version.parse('''1.11'''    )

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





	@property
	def      __UpperCamelCase							(      self   :						List[Any]):
			return 1e-5












'''simple docstring'''




def       __UpperCAmelCase						(  lowerCamelCase_     ,      lowerCamelCase_)							->     list[str]:
		return [sentence[i : i + ngram_size] for i in range(len(lowerCamelCase_) - ngram_size + 1)]


if __name__ == "__main__":
		from doctest import testmod

		testmod()




