





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


_a 						=      logging.get_logger(__name__)

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






class 					__A    (    lowerCAmelCase ):

			'''simple docstring'''







			lowerCAmelCase_							     =						"""efficientnet"""





			def __init__(    self       ,  __lowerCAmelCase = 3       ,  __lowerCAmelCase = 6_0_0       ,  __lowerCAmelCase = 2.0       ,  __lowerCAmelCase = 3.1       ,  __lowerCAmelCase = 8       ,  __lowerCAmelCase = [3, 3, 5, 3, 5, 5, 3]       ,  __lowerCAmelCase = [3_2, 1_6, 2_4, 4_0, 8_0, 1_1_2, 1_9_2]       ,  __lowerCAmelCase = [1_6, 2_4, 4_0, 8_0, 1_1_2, 1_9_2, 3_2_0]       ,  __lowerCAmelCase = []       ,  __lowerCAmelCase = [1, 2, 2, 2, 1, 2, 1]       ,  __lowerCAmelCase = [1, 2, 2, 3, 3, 4, 1]       ,  __lowerCAmelCase = [1, 6, 6, 6, 6, 6, 6]       ,  __lowerCAmelCase = 0.25       ,  __lowerCAmelCase = "swish"       ,  __lowerCAmelCase = 2_5_6_0       ,  __lowerCAmelCase = "mean"       ,  __lowerCAmelCase = 0.02       ,  __lowerCAmelCase = 0.001       ,  __lowerCAmelCase = 0.99       ,  __lowerCAmelCase = 0.5       ,  __lowerCAmelCase = 0.2       ,  **__lowerCAmelCase       ,  ):



				'''simple docstring'''







				super().__init__(**__lowerCAmelCase							)

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






class 					__A    (    lowerCAmelCase ):

			'''simple docstring'''







			lowerCAmelCase_							     =						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










from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


_a 						=      logging.get_logger(__name__)

_a 						=      {
    "hustvl/yolos-small": "https://huggingface.co/hustvl/yolos-small/resolve/main/config.json",
    # See all YOLOS models at https://huggingface.co/models?filter=yolos
}






class 					__A    (    lowerCAmelCase ):

			'''simple docstring'''







			lowerCAmelCase_							     =						"""yolos"""





			def __init__(    self       ,  __lowerCAmelCase=7_6_8       ,  __lowerCAmelCase=1_2       ,  __lowerCAmelCase=1_2       ,  __lowerCAmelCase=3_0_7_2       ,  __lowerCAmelCase="gelu"       ,  __lowerCAmelCase=0.0       ,  __lowerCAmelCase=0.0       ,  __lowerCAmelCase=0.02       ,  __lowerCAmelCase=1E-12       ,  __lowerCAmelCase=[5_1_2, 8_6_4]       ,  __lowerCAmelCase=1_6       ,  __lowerCAmelCase=3       ,  __lowerCAmelCase=True       ,  __lowerCAmelCase=1_0_0       ,  __lowerCAmelCase=True       ,  __lowerCAmelCase=False       ,  __lowerCAmelCase=1       ,  __lowerCAmelCase=5       ,  __lowerCAmelCase=2       ,  __lowerCAmelCase=5       ,  __lowerCAmelCase=2       ,  __lowerCAmelCase=0.1       ,  **__lowerCAmelCase       ,  ):



				'''simple docstring'''







				super().__init__(**__lowerCAmelCase							)

				lowerCamelCase__								=		hidden_size
				lowerCamelCase__								=		num_hidden_layers
				lowerCamelCase__								=		num_attention_heads
				lowerCamelCase__								=		intermediate_size
				lowerCamelCase__								=		hidden_act
				lowerCamelCase__								=		hidden_dropout_prob
				lowerCamelCase__								=		attention_probs_dropout_prob
				lowerCamelCase__								=		initializer_range
				lowerCamelCase__								=		layer_norm_eps
				lowerCamelCase__								=		image_size
				lowerCamelCase__								=		patch_size
				lowerCamelCase__								=		num_channels
				lowerCamelCase__								=		qkv_bias
				lowerCamelCase__								=		num_detection_tokens
				lowerCamelCase__								=		use_mid_position_embeddings
				lowerCamelCase__								=		auxiliary_loss
				# Hungarian matcher
				lowerCamelCase__								=		class_cost
				lowerCamelCase__								=		bbox_cost
				lowerCamelCase__								=		giou_cost
				# Loss coefficients
				lowerCamelCase__								=		bbox_loss_coefficient
				lowerCamelCase__								=		giou_loss_coefficient
				lowerCamelCase__								=		eos_coefficient






class 					__A    (    lowerCAmelCase ):

			'''simple docstring'''







			lowerCAmelCase_							     =						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-4





			@property
			def 		__lowerCamelCase				(    self							):



				'''simple docstring'''







				return 1_2



