



from typing import List, Optional, Union

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


lowerCamelCase_							:      Optional[Any]      =  logging.get_logger(__name__)

lowerCamelCase_							:      Optional[int]      =  {
    "huggingface/informer-tourism-monthly": (
        "https://huggingface.co/huggingface/informer-tourism-monthly/resolve/main/config.json"
    ),
    # See all Informer models at https://huggingface.co/models?filter=informer
}






class      UpperCamelCase    (						_UpperCAmelCase     ):
	lowerCAmelCase	:   Optional[int]				=	"""informer"""
	lowerCAmelCase	:   str				=	{
	    """hidden_size""": """d_model""",
	    """num_attention_heads""": """encoder_attention_heads""",
	    """num_hidden_layers""": """encoder_layers""",
	}



	def __init__(       self			,	UpperCAmelCase__ = None			,	UpperCAmelCase__ = None			,	UpperCAmelCase__ = "student_t"			,	UpperCAmelCase__ = "nll"			,	UpperCAmelCase__ = 1			,	UpperCAmelCase__ = None			,	UpperCAmelCase__ = "mean"			,	UpperCAmelCase__ = 0			,	UpperCAmelCase__ = 0			,	UpperCAmelCase__ = 0			,	UpperCAmelCase__ = 0			,	UpperCAmelCase__ = None			,	UpperCAmelCase__ = None			,	UpperCAmelCase__ = 64			,	UpperCAmelCase__ = 32			,	UpperCAmelCase__ = 32			,	UpperCAmelCase__ = 2			,	UpperCAmelCase__ = 2			,	UpperCAmelCase__ = 2			,	UpperCAmelCase__ = 2			,	UpperCAmelCase__ = True			,	UpperCAmelCase__ = "gelu"			,	UpperCAmelCase__ = 0.05			,	UpperCAmelCase__ = 0.1			,	UpperCAmelCase__ = 0.1			,	UpperCAmelCase__ = 0.1			,	UpperCAmelCase__ = 0.1			,	UpperCAmelCase__ = 100			,	UpperCAmelCase__ = 0.02			,	UpperCAmelCase__=True			,	UpperCAmelCase__ = "prob"			,	UpperCAmelCase__ = 5			,	UpperCAmelCase__ = True			,	**UpperCAmelCase__			,	):
							# time series specific configuration
							A__							=       prediction_length
							A__							=       context_length or prediction_length
							A__							=       distribution_output
							A__							=       loss
							A__							=       input_size
							A__							=       num_time_features
							A__							=       lags_sequence if lags_sequence is not None else [1, 2, 3, 4, 5, 6, 7]
							A__							=       scaling
							A__							=       num_dynamic_real_features
							A__							=       num_static_real_features
							A__							=       num_static_categorical_features

							# set cardinality
							if cardinality 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`"		)
													A__							=       cardinality
							else:
													A__							=       [0]

							# set embedding_dimension
							if embedding_dimension 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`"		)
													A__							=       embedding_dimension
							else:
													A__							=       [min(50			,	(cat + 1) // 2		) for cat in self.cardinality]

							A__							=       num_parallel_samples

							# Transformer architecture configuration
							A__							=       input_size * len(self.lags_sequence		) + self._number_of_features
							A__							=       d_model
							A__							=       encoder_attention_heads
							A__							=       decoder_attention_heads
							A__							=       encoder_ffn_dim
							A__							=       decoder_ffn_dim
							A__							=       encoder_layers
							A__							=       decoder_layers

							A__							=       dropout
							A__							=       attention_dropout
							A__							=       activation_dropout
							A__							=       encoder_layerdrop
							A__							=       decoder_layerdrop

							A__							=       activation_function
							A__							=       init_std

							A__							=       use_cache

							# Informer
							A__							=       attention_type
							A__							=       sampling_factor
							A__							=       distil

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



	@property
	def 			__A							(       self		):
							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
							)










def  UpperCamelCase						(       _A			:				int			,							_A			:				int    )->       int:





						"""simple docstring"""





						return int((input_a, input_a).count(0    ) == 0    )
def  UpperCamelCase						(       )->       None:





						"""simple docstring"""





						assert and_gate(0			,							0    ) == 0
						assert and_gate(0			,							1    ) == 0
						assert and_gate(1			,							0    ) == 0
						assert and_gate(1			,							1    ) == 1


if __name__ == "__main__":
						test_and_gate()
						print(and_gate(1, 0))
						print(and_gate(0, 0))
						print(and_gate(0, 1))
						print(and_gate(1, 1))





