


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


snake_case_						:			str													=							logging.get_logger(__name__)

snake_case_						:			Optional[Any]													=							{
    '''google/efficientnet-b7''': '''https://huggingface.co/google/efficientnet-b7/resolve/main/config.json''',
}

class 						A__							(		UpperCamelCase__  ):
						UpperCAmelCase             =						"efficientnet"




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


										"""simple docstring"""





										super().__init__(**_a  )

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

class 						A__							(		UpperCamelCase__  ):
						UpperCAmelCase             =						version.parse("1.11"  )




						@property
						def 							__UpperCamelCase				(       self					:      Any  )							->     Mapping[str, Mapping[int, str]]:


										"""simple docstring"""





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




						@property
						def 							__UpperCamelCase				(       self					:      Tuple  )							->     float:


										"""simple docstring"""





										return 1E-5



import importlib
import os
from dataclasses import dataclass
from enum import Enum
from typing import Any, Dict, Optional, Union

import torch

from ..utils import BaseOutput


snake_case_						:			Optional[Any]													=							'''scheduler_config.json'''

class 						A__							(		UpperCamelCase__  ):
						UpperCAmelCase             =						1
						UpperCAmelCase             =						2
						UpperCAmelCase             =						3
						UpperCAmelCase             =						4
						UpperCAmelCase             =						5
						UpperCAmelCase             =						6
						UpperCAmelCase             =						7
						UpperCAmelCase             =						8
						UpperCAmelCase             =						9
						UpperCAmelCase             =						10
						UpperCAmelCase             =						11
						UpperCAmelCase             =						12
						UpperCAmelCase             =						13
						UpperCAmelCase             =						14

@dataclass
class 						A__							(		UpperCamelCase__  ):
						UpperCAmelCase             =						42

class 						A__							:
						UpperCAmelCase             =						SCHEDULER_CONFIG_NAME
						UpperCAmelCase             =						[]
						UpperCAmelCase             =						True




						@classmethod
						def 							__UpperCamelCase				(       cls					:      List[str]				,    _a					:      Dict[str, Any] = None				,    _a					:      Optional[str] = None				,    _a					:      Optional[Any]=False				,    **_a					:      Dict				,    )							->     Dict:


										"""simple docstring"""





										_SCREAMING_SNAKE_CASE  ,				_SCREAMING_SNAKE_CASE  ,				_SCREAMING_SNAKE_CASE			  =cls.load_config(
										    pretrained_model_name_or_path=_a				,    subfolder=_a				,    return_unused_kwargs=_a				,    return_commit_hash=_a				,    **_a				,    )
										return cls.from_config(_a				,    return_unused_kwargs=_a				,    **_a  )




						def 							__UpperCamelCase				(       self					:      Dict				,    _a					:      Union[str, os.PathLike]				,    _a					:      bool = False				,    **_a					:      int  )							->     Dict:


										"""simple docstring"""





										self.save_config(save_directory=_a				,    push_to_hub=_a				,    **_a  )




						@property
						def 							__UpperCamelCase				(       self					:      List[str]  )							->     List[Any]:


										"""simple docstring"""





										return self._get_compatibles()




						@classmethod
						def 							__UpperCamelCase				(       cls					:      List[Any]  )							->     str:


										"""simple docstring"""





										_SCREAMING_SNAKE_CASE			  =list(set([cls.__name__] + cls._compatibles  )  )
										_SCREAMING_SNAKE_CASE			  =importlib.import_module(__name__.split('''.'''  )[0]  )
										_SCREAMING_SNAKE_CASE			  =[
										    getattr(_a				,    _a  ) for c in compatible_classes_str if hasattr(_a				,    _a  )
										]
										return compatible_classes