
'''simple docstring'''
from typing import List, Optional

from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowercase__						       =      logging.get_logger(__name__)

lowercase__						       =      {
    "huggingface/autoformer-tourism-monthly": "https://huggingface.co/huggingface/autoformer-tourism-monthly/resolve/main/config.json",
}






class 	snake_case__       (      __SCREAMING_SNAKE_CASE					):







		"""simple docstring"""

		lowerCamelCase     							=						"""autoformer"""
		lowerCamelCase     							=						{
		    """hidden_size""": """d_model""",
		    """num_attention_heads""": """encoder_attention_heads""",
		    """num_hidden_layers""": """encoder_layers""",
		}



		def __init__(      self				:			List[Any]  ,	UpperCamelCase__				:			Optional[int] = None  ,	UpperCamelCase__				:			Optional[int] = None  ,	UpperCamelCase__				:			str = "student_t"  ,	UpperCamelCase__				:			str = "nll"  ,	UpperCamelCase__				:			int = 1  ,	UpperCamelCase__				:			List[int] = [1, 2, 3, 4, 5, 6, 7]  ,	UpperCamelCase__				:			bool = True  ,	UpperCamelCase__				:			int = 0  ,	UpperCamelCase__				:			int = 0  ,	UpperCamelCase__				:			int = 0  ,	UpperCamelCase__				:			int = 0  ,	UpperCamelCase__				:			Optional[List[int]] = None  ,	UpperCamelCase__				:			Optional[List[int]] = None  ,	UpperCamelCase__				:			int = 64  ,	UpperCamelCase__				:			int = 2  ,	UpperCamelCase__				:			int = 2  ,	UpperCamelCase__				:			int = 2  ,	UpperCamelCase__				:			int = 2  ,	UpperCamelCase__				:			int = 32  ,	UpperCamelCase__				:			int = 32  ,	UpperCamelCase__				:			str = "gelu"  ,	UpperCamelCase__				:			float = 0.1  ,	UpperCamelCase__				:			float = 0.1  ,	UpperCamelCase__				:			float = 0.1  ,	UpperCamelCase__				:			float = 0.1  ,	UpperCamelCase__				:			float = 0.1  ,	UpperCamelCase__				:			int = 100  ,	UpperCamelCase__				:			float = 0.02  ,	UpperCamelCase__				:			bool = True  ,	UpperCamelCase__				:			Union[str, Any]=True  ,	UpperCamelCase__				:			int = 10  ,	UpperCamelCase__				:			int = 25  ,	UpperCamelCase__				:			int = 3  ,	**UpperCamelCase__				:			Optional[int]  ,	)						->			str:






				"""simple docstring"""







				snake_case  :       Dict     			=						prediction_length
				snake_case  :       str     			=						context_length if context_length is not None else prediction_length
				snake_case  :       Dict     			=						distribution_output
				snake_case  :       Dict     			=						loss
				snake_case  :       Optional[int]     			=						input_size
				snake_case  :       int     			=						num_time_features
				snake_case  :       List[Any]     			=						lags_sequence
				snake_case  :       Dict     			=						scaling
				snake_case  :       Tuple     			=						num_dynamic_real_features
				snake_case  :       int     			=						num_static_real_features
				snake_case  :       Dict     			=						num_static_categorical_features
				if cardinality is not None and num_static_categorical_features > 0:
						if len(UpperCamelCase__      ) != num_static_categorical_features:
								raise ValueError(
								    '''The cardinality should be a list of the same length as `num_static_categorical_features`'''      )
						snake_case  :       Tuple     			=						cardinality
				else:
						snake_case  :       List[str]     			=						[0]
				if embedding_dimension is not None and num_static_categorical_features > 0:
						if len(UpperCamelCase__      ) != num_static_categorical_features:
								raise ValueError(
								    '''The embedding dimension should be a list of the same length as `num_static_categorical_features`'''      )
						snake_case  :       Tuple     			=						embedding_dimension
				else:
						snake_case  :       int     			=						[min(50  ,	(cat + 1) // 2      ) for cat in self.cardinality]
				snake_case  :       Dict     			=						num_parallel_samples

				# Transformer architecture configuration
				snake_case  :       List[str]     			=						input_size * len(self.lags_sequence      ) + self._number_of_features
				snake_case  :       List[str]     			=						d_model
				snake_case  :       Union[str, Any]     			=						encoder_attention_heads
				snake_case  :       Any     			=						decoder_attention_heads
				snake_case  :       Optional[int]     			=						encoder_ffn_dim
				snake_case  :       int     			=						decoder_ffn_dim
				snake_case  :       int     			=						encoder_layers
				snake_case  :       int     			=						decoder_layers

				snake_case  :       List[Any]     			=						dropout
				snake_case  :       Dict     			=						attention_dropout
				snake_case  :       Union[str, Any]     			=						activation_dropout
				snake_case  :       Tuple     			=						encoder_layerdrop
				snake_case  :       Tuple     			=						decoder_layerdrop

				snake_case  :       Optional[Any]     			=						activation_function
				snake_case  :       List[str]     			=						init_std

				snake_case  :       Union[str, Any]     			=						use_cache

				# Autoformer
				snake_case  :       List[Any]     			=						label_length
				snake_case  :       List[Any]     			=						moving_average
				snake_case  :       Optional[Any]     			=						autocorrelation_factor

				super().__init__(is_encoder_decoder=UpperCamelCase__  ,	**UpperCamelCase__      )



		@property
		def       lowerCAmelCase				(      self				:			str      )						->			int:






				"""simple docstring"""







				return (
				    sum(self.embedding_dimension      )
				    + self.num_dynamic_real_features
				    + self.num_time_features
				    + self.num_static_real_features
				    + self.input_size * 2  # the log1p(abs(loc)) and log(scale) features
				)




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


lowercase__						       =      logging.get_logger(__name__)

lowercase__						       =      {
    "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 	snake_case__       (      __SCREAMING_SNAKE_CASE					):







		"""simple docstring"""

		lowerCamelCase     							=						"""yolos"""



		def __init__(      self				:			Any  ,	UpperCamelCase__				:			Optional[Any]=768  ,	UpperCamelCase__				:			Any=12  ,	UpperCamelCase__				:			Optional[int]=12  ,	UpperCamelCase__				:			Union[str, Any]=3072  ,	UpperCamelCase__				:			str="gelu"  ,	UpperCamelCase__				:			Union[str, Any]=0.0  ,	UpperCamelCase__				:			Union[str, Any]=0.0  ,	UpperCamelCase__				:			Union[str, Any]=0.02  ,	UpperCamelCase__				:			List[Any]=1e-1_2  ,	UpperCamelCase__				:			List[Any]=[512, 864]  ,	UpperCamelCase__				:			int=16  ,	UpperCamelCase__				:			Union[str, Any]=3  ,	UpperCamelCase__				:			Union[str, Any]=True  ,	UpperCamelCase__				:			int=100  ,	UpperCamelCase__				:			Optional[Any]=True  ,	UpperCamelCase__				:			int=False  ,	UpperCamelCase__				:			Dict=1  ,	UpperCamelCase__				:			Optional[int]=5  ,	UpperCamelCase__				:			List[str]=2  ,	UpperCamelCase__				:			Union[str, Any]=5  ,	UpperCamelCase__				:			Union[str, Any]=2  ,	UpperCamelCase__				:			int=0.1  ,	**UpperCamelCase__				:			Optional[Any]  ,	)						->			Any:






				"""simple docstring"""







				super().__init__(**UpperCamelCase__      )

				snake_case  :       List[str]     			=						hidden_size
				snake_case  :       Union[str, Any]     			=						num_hidden_layers
				snake_case  :       List[str]     			=						num_attention_heads
				snake_case  :       Any     			=						intermediate_size
				snake_case  :       int     			=						hidden_act
				snake_case  :       Optional[Any]     			=						hidden_dropout_prob
				snake_case  :       int     			=						attention_probs_dropout_prob
				snake_case  :       Union[str, Any]     			=						initializer_range
				snake_case  :       List[Any]     			=						layer_norm_eps
				snake_case  :       Tuple     			=						image_size
				snake_case  :       Any     			=						patch_size
				snake_case  :       str     			=						num_channels
				snake_case  :       Optional[int]     			=						qkv_bias
				snake_case  :       Optional[Any]     			=						num_detection_tokens
				snake_case  :       Dict     			=						use_mid_position_embeddings
				snake_case  :       List[Any]     			=						auxiliary_loss
				# Hungarian matcher
				snake_case  :       List[str]     			=						class_cost
				snake_case  :       Optional[Any]     			=						bbox_cost
				snake_case  :       Tuple     			=						giou_cost
				# Loss coefficients
				snake_case  :       Union[str, Any]     			=						bbox_loss_coefficient
				snake_case  :       List[Any]     			=						giou_loss_coefficient
				snake_case  :       Tuple     			=						eos_coefficient







class 	snake_case__       (      __SCREAMING_SNAKE_CASE					):







		"""simple docstring"""

		lowerCamelCase     							=						version.parse("""1.11"""					)



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






				"""simple docstring"""







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



		@property
		def       lowerCAmelCase				(      self				:			int      )						->			float:






				"""simple docstring"""







				return 1e-4



		@property
		def       lowerCAmelCase				(      self				:			Tuple      )						->			int:






				"""simple docstring"""







				return 12


