

import collections
import inspect
import unittest

from transformers import FocalNetConfig
from transformers.testing_utils import require_torch, require_vision, slow, torch_device
from transformers.utils import cached_property, is_torch_available, is_vision_available

from ...test_backbone_common import BackboneTesterMixin
from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, _config_zero_init, floats_tensor, ids_tensor
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
						import torch
						from torch import nn

						from transformers import (
						    FocalNetBackbone,
						    FocalNetForImageClassification,
						    FocalNetForMaskedImageModeling,
						    FocalNetModel,
						)
						from transformers.models.focalnet.modeling_focalnet import FOCALNET_PRETRAINED_MODEL_ARCHIVE_LIST

if is_vision_available():
						from PIL import Image

						from transformers import AutoImageProcessor

class 				__UpperCamelCase				:







	def __init__(   self: int  , __UpperCamelCase: Optional[Any]  , __UpperCamelCase: Union[str, Any]=13  , __UpperCamelCase: int=32  , __UpperCamelCase: List[Any]=2  , __UpperCamelCase: str=3  , __UpperCamelCase: List[str]=16  , __UpperCamelCase: List[Any]=[32, 64, 1_28]  , __UpperCamelCase: Optional[Any]=[1, 2, 1]  , __UpperCamelCase: Optional[int]=[2, 2, 4]  , __UpperCamelCase: Union[str, Any]=2  , __UpperCamelCase: Tuple=2.0  , __UpperCamelCase: List[Any]=True  , __UpperCamelCase: Dict=0.0  , __UpperCamelCase: int=0.0  , __UpperCamelCase: Any=0.1  , __UpperCamelCase: Any="gelu"  , __UpperCamelCase: Union[str, Any]=False  , __UpperCamelCase: List[str]=True  , __UpperCamelCase: List[Any]=0.02  , __UpperCamelCase: List[Any]=1E-5  , __UpperCamelCase: Tuple=True  , __UpperCamelCase: Any=None  , __UpperCamelCase: List[str]=True  , __UpperCamelCase: Dict=10  , __UpperCamelCase: int=8  , __UpperCamelCase: List[str]=["stage1", "stage2"]  , __UpperCamelCase: Tuple=[1, 2]  , ):

						'''simple docstring'''





						__magic_name__							=    parent
						__magic_name__							=    batch_size
						__magic_name__							=    image_size
						__magic_name__							=    patch_size
						__magic_name__							=    num_channels
						__magic_name__							=    embed_dim
						__magic_name__							=    hidden_sizes
						__magic_name__							=    depths
						__magic_name__							=    num_heads
						__magic_name__							=    window_size
						__magic_name__							=    mlp_ratio
						__magic_name__							=    qkv_bias
						__magic_name__							=    hidden_dropout_prob
						__magic_name__							=    attention_probs_dropout_prob
						__magic_name__							=    drop_path_rate
						__magic_name__							=    hidden_act
						__magic_name__							=    use_absolute_embeddings
						__magic_name__							=    patch_norm
						__magic_name__							=    layer_norm_eps
						__magic_name__							=    initializer_range
						__magic_name__							=    is_training
						__magic_name__							=    scope
						__magic_name__							=    use_labels
						__magic_name__							=    type_sequence_label_size
						__magic_name__							=    encoder_stride
						__magic_name__							=    out_features
						__magic_name__							=    out_indices







	def 	_SCREAMING_SNAKE_CASE							(   self: Tuple      ):

						'''simple docstring'''





						__magic_name__							=    floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size]      )

						__magic_name__							=    None
						if self.use_labels:
											__magic_name__							=    ids_tensor([self.batch_size]  , self.type_sequence_label_size      )

						__magic_name__							=    self.get_config()

						return config, pixel_values, labels







	def 	_SCREAMING_SNAKE_CASE							(   self: List[str]      ):

						'''simple docstring'''





						return FocalNetConfig(
						    image_size=self.image_size  , patch_size=self.patch_size  , num_channels=self.num_channels  , embed_dim=self.embed_dim  , hidden_sizes=self.hidden_sizes  , depths=self.depths  , num_heads=self.num_heads  , window_size=self.window_size  , mlp_ratio=self.mlp_ratio  , qkv_bias=self.qkv_bias  , hidden_dropout_prob=self.hidden_dropout_prob  , attention_probs_dropout_prob=self.attention_probs_dropout_prob  , drop_path_rate=self.drop_path_rate  , hidden_act=self.hidden_act  , use_absolute_embeddings=self.use_absolute_embeddings  , path_norm=self.patch_norm  , layer_norm_eps=self.layer_norm_eps  , initializer_range=self.initializer_range  , encoder_stride=self.encoder_stride  , out_features=self.out_features  , out_indices=self.out_indices  , )







	def 	_SCREAMING_SNAKE_CASE							(   self: Dict  , __UpperCamelCase: Dict  , __UpperCamelCase: Dict  , __UpperCamelCase: Dict      ):

						'''simple docstring'''





						__magic_name__							=    FocalNetModel(config=__UpperCamelCase      )
						model.to(__UpperCamelCase      )
						model.eval()
						__magic_name__							=    model(__UpperCamelCase      )

						__magic_name__							=    ((config.image_size // config.patch_size) ** 2) // (4 ** (len(config.depths      ) - 1))
						__magic_name__							=    int(config.embed_dim * 2 ** (len(config.depths      ) - 1)      )

						self.parent.assertEqual(result.last_hidden_state.shape  , (self.batch_size, expected_seq_len, expected_dim)      )







	def 	_SCREAMING_SNAKE_CASE							(   self: Union[str, Any]  , __UpperCamelCase: Any  , __UpperCamelCase: int  , __UpperCamelCase: Optional[Any]      ):

						'''simple docstring'''





						__magic_name__							=    FocalNetBackbone(config=__UpperCamelCase      )
						model.to(__UpperCamelCase      )
						model.eval()
						__magic_name__							=    model(__UpperCamelCase      )

						# verify feature maps
						self.parent.assertEqual(len(result.feature_maps      )  , len(config.out_features      )      )
						self.parent.assertListEqual(list(result.feature_maps[0].shape      )  , [self.batch_size, self.image_size, 8, 8]      )

						# verify channels
						self.parent.assertEqual(len(model.channels      )  , len(config.out_features      )      )
						self.parent.assertListEqual(model.channels  , config.hidden_sizes[:-1]      )

						# verify backbone works with out_features=None
						__magic_name__							=    None
						__magic_name__							=    FocalNetBackbone(config=__UpperCamelCase      )
						model.to(__UpperCamelCase      )
						model.eval()
						__magic_name__							=    model(__UpperCamelCase      )

						# verify feature maps
						self.parent.assertEqual(len(result.feature_maps      )  , 1      )
						self.parent.assertListEqual(list(result.feature_maps[0].shape      )  , [self.batch_size, self.image_size * 2, 4, 4]      )

						# verify channels
						self.parent.assertEqual(len(model.channels      )  , 1      )
						self.parent.assertListEqual(model.channels  , [config.hidden_sizes[-1]]      )







	def 	_SCREAMING_SNAKE_CASE							(   self: Optional[Any]  , __UpperCamelCase: Tuple  , __UpperCamelCase: List[str]  , __UpperCamelCase: Union[str, Any]      ):

						'''simple docstring'''





						__magic_name__							=    FocalNetForMaskedImageModeling(config=__UpperCamelCase      )
						model.to(__UpperCamelCase      )
						model.eval()
						__magic_name__							=    model(__UpperCamelCase      )
						self.parent.assertEqual(
						    result.reconstruction.shape  , (self.batch_size, self.num_channels, self.image_size, self.image_size)      )

						# test greyscale images
						__magic_name__							=    1
						__magic_name__							=    FocalNetForMaskedImageModeling(__UpperCamelCase      )
						model.to(__UpperCamelCase      )
						model.eval()

						__magic_name__							=    floats_tensor([self.batch_size, 1, self.image_size, self.image_size]      )
						__magic_name__							=    model(__UpperCamelCase      )
						self.parent.assertEqual(result.reconstruction.shape  , (self.batch_size, 1, self.image_size, self.image_size)      )







	def 	_SCREAMING_SNAKE_CASE							(   self: Any  , __UpperCamelCase: Optional[int]  , __UpperCamelCase: Optional[int]  , __UpperCamelCase: Optional[int]      ):

						'''simple docstring'''





						__magic_name__							=    self.type_sequence_label_size
						__magic_name__							=    FocalNetForImageClassification(__UpperCamelCase      )
						model.to(__UpperCamelCase      )
						model.eval()
						__magic_name__							=    model(__UpperCamelCase  , labels=__UpperCamelCase      )
						self.parent.assertEqual(result.logits.shape  , (self.batch_size, self.type_sequence_label_size)      )

						# test greyscale images
						__magic_name__							=    1
						__magic_name__							=    FocalNetForImageClassification(__UpperCamelCase      )
						model.to(__UpperCamelCase      )
						model.eval()

						__magic_name__							=    floats_tensor([self.batch_size, 1, self.image_size, self.image_size]      )
						__magic_name__							=    model(__UpperCamelCase      )
						self.parent.assertEqual(result.logits.shape  , (self.batch_size, self.type_sequence_label_size)      )







	def 	_SCREAMING_SNAKE_CASE							(   self: Optional[Any]      ):

						'''simple docstring'''





						__magic_name__							=    self.prepare_config_and_inputs()

						__magic_name__,	__magic_name__,	__magic_name__							=    config_and_inputs
						__magic_name__							=    {'pixel_values': pixel_values}
						return config, inputs_dict




@require_torch
class 				__UpperCamelCase				(					SCREAMING_SNAKE_CASE  ,						SCREAMING_SNAKE_CASE  ,						unittest.TestCase			):
	_lowercase  :   str       				=  (
	    (
	        FocalNetModel,
	        FocalNetForImageClassification,
	        FocalNetForMaskedImageModeling,
	        FocalNetBackbone,
	    )
	    if is_torch_available()
	    else ()
	)
	_lowercase  :   Union[str, Any]       				=  (
	    {"feature-extraction": FocalNetModel, "image-classification": FocalNetForImageClassification}
	    if is_torch_available()
	    else {}
	)
	_lowercase  :   Union[str, Any]       				=  False

	_lowercase  :   str       				=  False
	_lowercase  :   str       				=  False
	_lowercase  :   int       				=  False
	_lowercase  :   Optional[Any]       				=  False







	def 	_SCREAMING_SNAKE_CASE							(   self: str      ):

						'''simple docstring'''





						__magic_name__							=    FocalNetModelTester(self      )
						__magic_name__							=    ConfigTester(self  , config_class=__UpperCamelCase  , embed_dim=37  , has_text_modality=__UpperCamelCase      )







	def 	_SCREAMING_SNAKE_CASE							(   self: int      ):

						'''simple docstring'''





						self.create_and_test_config_common_properties()
						self.config_tester.create_and_test_config_to_json_string()
						self.config_tester.create_and_test_config_to_json_file()
						self.config_tester.create_and_test_config_from_and_save_pretrained()
						self.config_tester.create_and_test_config_with_num_labels()
						self.config_tester.check_config_can_be_init_without_params()
						self.config_tester.check_config_arguments_init()







	def 	_SCREAMING_SNAKE_CASE							(   self: Optional[Any]      ):

						'''simple docstring'''





						return







	def 	_SCREAMING_SNAKE_CASE							(   self: Tuple      ):

						'''simple docstring'''





						__magic_name__							=    self.model_tester.prepare_config_and_inputs()
						self.model_tester.create_and_check_model(*__UpperCamelCase      )







	def 	_SCREAMING_SNAKE_CASE							(   self: Tuple      ):

						'''simple docstring'''





						__magic_name__							=    self.model_tester.prepare_config_and_inputs()
						self.model_tester.create_and_check_backbone(*__UpperCamelCase      )







	def 	_SCREAMING_SNAKE_CASE							(   self: str      ):

						'''simple docstring'''





						__magic_name__							=    self.model_tester.prepare_config_and_inputs()
						self.model_tester.create_and_check_for_masked_image_modeling(*__UpperCamelCase      )







	def 	_SCREAMING_SNAKE_CASE							(   self: List[Any]      ):

						'''simple docstring'''





						__magic_name__							=    self.model_tester.prepare_config_and_inputs()
						self.model_tester.create_and_check_for_image_classification(*__UpperCamelCase      )







	@unittest.skip(reason='FocalNet does not use inputs_embeds'      )
	def 	_SCREAMING_SNAKE_CASE							(   self: Tuple      ):

						'''simple docstring'''





						pass







	@unittest.skip(reason='FocalNet does not use feedforward chunking'      )
	def 	_SCREAMING_SNAKE_CASE							(   self: Union[str, Any]      ):

						'''simple docstring'''





						pass







	def 	_SCREAMING_SNAKE_CASE							(   self: Dict      ):

						'''simple docstring'''





						__magic_name__,	__magic_name__							=    self.model_tester.prepare_config_and_inputs_for_common()

						for model_class in self.all_model_classes[:-1]:
											__magic_name__							=    model_class(__UpperCamelCase      )
											self.assertIsInstance(model.get_input_embeddings()  , (nn.Module)      )
											__magic_name__							=    model.get_output_embeddings()
											self.assertTrue(x is None or isinstance(__UpperCamelCase  , nn.Linear      )      )







	def 	_SCREAMING_SNAKE_CASE							(   self: Optional[int]      ):

						'''simple docstring'''





						__magic_name__,	__magic_name__							=    self.model_tester.prepare_config_and_inputs_for_common()

						for model_class in self.all_model_classes[:-1]:
											__magic_name__							=    model_class(__UpperCamelCase      )
											__magic_name__							=    inspect.signature(model.forward      )
											# signature.parameters is an OrderedDict => so arg_names order is deterministic
											__magic_name__							=    [*signature.parameters.keys()]

											__magic_name__							=    ['pixel_values']
											self.assertListEqual(arg_names[:1]  , __UpperCamelCase      )







	def 	_SCREAMING_SNAKE_CASE							(   self: Any  , __UpperCamelCase: Optional[Any]  , __UpperCamelCase: int  , __UpperCamelCase: Any  , __UpperCamelCase: int      ):

						'''simple docstring'''





						__magic_name__							=    model_class(__UpperCamelCase      )
						model.to(__UpperCamelCase      )
						model.eval()

						with torch.no_grad():
											__magic_name__							=    model(**self._prepare_for_class(__UpperCamelCase  , __UpperCamelCase      )      )

						__magic_name__							=    outputs.hidden_states

						__magic_name__							=    getattr(
						    self.model_tester  , 'expected_num_hidden_layers'  , len(self.model_tester.depths      ) + 1      )
						self.assertEqual(len(__UpperCamelCase      )  , __UpperCamelCase      )

						# FocalNet has a different seq_length
						__magic_name__							=    (
						    config.patch_size
						    if isinstance(config.patch_size  , collections.abc.Iterable      )
						    else (config.patch_size, config.patch_size)
						)

						__magic_name__							=    (image_size[1] // patch_size[1]) * (image_size[0] // patch_size[0])

						self.assertListEqual(
						    list(hidden_states[0].shape[-2:]      )  , [num_patches, self.model_tester.embed_dim]  , )

						__magic_name__							=    outputs.reshaped_hidden_states
						self.assertEqual(len(__UpperCamelCase      )  , __UpperCamelCase      )

						__magic_name__,	__magic_name__,	__magic_name__,	__magic_name__							=    reshaped_hidden_states[0].shape
						__magic_name__							=    (
						    reshaped_hidden_states[0].view(__UpperCamelCase  , __UpperCamelCase  , height * width      ).permute(0  , 2  , 1      )
						)
						self.assertListEqual(
						    list(reshaped_hidden_states.shape[-2:]      )  , [num_patches, self.model_tester.embed_dim]  , )







	def 	_SCREAMING_SNAKE_CASE							(   self: Optional[int]      ):

						'''simple docstring'''





						__magic_name__,	__magic_name__							=    self.model_tester.prepare_config_and_inputs_for_common()

						__magic_name__							=    (
						    self.model_tester.image_size
						    if isinstance(self.model_tester.image_size  , collections.abc.Iterable      )
						    else (self.model_tester.image_size, self.model_tester.image_size)
						)

						for model_class in self.all_model_classes[:-1]:
											__magic_name__							=    True
											self.check_hidden_states_output(__UpperCamelCase  , __UpperCamelCase  , __UpperCamelCase  , __UpperCamelCase      )

											# check that output_hidden_states also work using config
											del inputs_dict["output_hidden_states"]
											__magic_name__							=    True

											self.check_hidden_states_output(__UpperCamelCase  , __UpperCamelCase  , __UpperCamelCase  , __UpperCamelCase      )







	def 	_SCREAMING_SNAKE_CASE							(   self: Optional[Any]      ):

						'''simple docstring'''





						__magic_name__,	__magic_name__							=    self.model_tester.prepare_config_and_inputs_for_common()
						__magic_name__							=    3

						__magic_name__							=    (
						    self.model_tester.image_size
						    if isinstance(self.model_tester.image_size  , collections.abc.Iterable      )
						    else (self.model_tester.image_size, self.model_tester.image_size)
						)
						__magic_name__							=    (
						    config.patch_size
						    if isinstance(config.patch_size  , collections.abc.Iterable      )
						    else (config.patch_size, config.patch_size)
						)

						__magic_name__							=    image_size[0] + patch_size[0] - (image_size[0] % patch_size[0])
						__magic_name__							=    image_size[1] + patch_size[1] - (image_size[1] % patch_size[1])

						for model_class in self.all_model_classes[:-1]:
											__magic_name__							=    True
											self.check_hidden_states_output(__UpperCamelCase  , __UpperCamelCase  , __UpperCamelCase  , (padded_height, padded_width)      )

											# check that output_hidden_states also work using config
											del inputs_dict["output_hidden_states"]
											__magic_name__							=    True
											self.check_hidden_states_output(__UpperCamelCase  , __UpperCamelCase  , __UpperCamelCase  , (padded_height, padded_width)      )







	@slow
	def 	_SCREAMING_SNAKE_CASE							(   self: Tuple      ):

						'''simple docstring'''





						for model_name in FOCALNET_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
											__magic_name__							=    FocalNetModel.from_pretrained(__UpperCamelCase      )
											self.assertIsNotNone(__UpperCamelCase      )







	def 	_SCREAMING_SNAKE_CASE							(   self: List[Any]      ):

						'''simple docstring'''





						__magic_name__,	__magic_name__							=    self.model_tester.prepare_config_and_inputs_for_common()

						__magic_name__							=    _config_zero_init(__UpperCamelCase      )
						for model_class in self.all_model_classes:
											__magic_name__							=    model_class(config=__UpperCamelCase      )
											for name, param in model.named_parameters():
																if "embeddings" not in name and param.requires_grad:
																					self.assertIn(
																					    ((param.data.mean() * 1E9).round() / 1E9).item()  , [0.0, 1.0]  , msg=F'Parameter {name} of model {model_class} seems not properly initialized'  , )




@require_vision
@require_torch
class 				__UpperCamelCase				(					unittest.TestCase			):







	@cached_property
	def 	_SCREAMING_SNAKE_CASE							(   self: List[str]      ):

						'''simple docstring'''





						return AutoImageProcessor.from_pretrained('microsoft/focalnet-tiny'      ) if is_vision_available() else None







	@slow
	def 	_SCREAMING_SNAKE_CASE							(   self: List[Any]      ):

						'''simple docstring'''





						__magic_name__							=    FocalNetForImageClassification.from_pretrained('microsoft/focalnet-tiny'      ).to(__UpperCamelCase      )
						__magic_name__							=    self.default_image_processor

						__magic_name__							=    Image.open('./tests/fixtures/tests_samples/COCO/000000039769.png'      )
						__magic_name__							=    image_processor(images=__UpperCamelCase  , return_tensors='pt'      ).to(__UpperCamelCase      )

						# forward pass
						with torch.no_grad():
											__magic_name__							=    model(**__UpperCamelCase      )

						# verify the logits
						__magic_name__							=    torch.Size((1, 10_00)      )
						self.assertEqual(outputs.logits.shape  , __UpperCamelCase      )
						__magic_name__							=    torch.tensor([0.2166, -0.4368, 0.2191]      ).to(__UpperCamelCase      )
						self.assertTrue(torch.allclose(outputs.logits[0, :3]  , __UpperCamelCase  , atol=1E-4      )      )
						self.assertTrue(outputs.logits.argmax(dim=-1      ).item()  , 2_81      )




@require_torch
class 				__UpperCamelCase				(					SCREAMING_SNAKE_CASE  ,						unittest.TestCase			):
	_lowercase  :   Optional[Any]       				=  (FocalNetBackbone,) if is_torch_available() else ()
	_lowercase  :   int       				=  FocalNetConfig

	_lowercase  :   Any       				=  False







	def 	_SCREAMING_SNAKE_CASE							(   self: int      ):

						'''simple docstring'''





						__magic_name__							=    FocalNetModelTester(self      )







from typing import List, Optional, Union

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


A__						=							logging.get_logger(__name__)

A__						=							{
    "huggingface/time-series-transformer-tourism-monthly": (
        "https://huggingface.co/huggingface/time-series-transformer-tourism-monthly/resolve/main/config.json"
    ),
    # See all TimeSeriesTransformer models at https://huggingface.co/models?filter=time_series_transformer
}

class 				__UpperCamelCase				(					SCREAMING_SNAKE_CASE			):
	_lowercase  :   Optional[int]       				=  "time_series_transformer"
	_lowercase  :   Dict       				=  {
	    "hidden_size": "d_model",
	    "num_attention_heads": "encoder_attention_heads",
	    "num_hidden_layers": "encoder_layers",
	}







	def __init__(   self: str  , __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: Optional[Union[str, bool]] = "mean"  , __UpperCamelCase: int = 0  , __UpperCamelCase: int = 0  , __UpperCamelCase: int = 0  , __UpperCamelCase: int = 0  , __UpperCamelCase: Optional[List[int]] = None  , __UpperCamelCase: Optional[List[int]] = None  , __UpperCamelCase: int = 32  , __UpperCamelCase: int = 32  , __UpperCamelCase: int = 2  , __UpperCamelCase: int = 2  , __UpperCamelCase: int = 2  , __UpperCamelCase: int = 2  , __UpperCamelCase: bool = True  , __UpperCamelCase: str = "gelu"  , __UpperCamelCase: int = 64  , __UpperCamelCase: float = 0.1  , __UpperCamelCase: float = 0.1  , __UpperCamelCase: float = 0.1  , __UpperCamelCase: float = 0.1  , __UpperCamelCase: float = 0.1  , __UpperCamelCase: int = 1_00  , __UpperCamelCase: float = 0.02  , __UpperCamelCase: Any=True  , **__UpperCamelCase: Optional[Any]  , ):

						'''simple docstring'''





						__magic_name__							=    prediction_length
						__magic_name__							=    context_length or prediction_length
						__magic_name__							=    distribution_output
						__magic_name__							=    loss
						__magic_name__							=    input_size
						__magic_name__							=    num_time_features
						__magic_name__							=    lags_sequence
						__magic_name__							=    scaling
						__magic_name__							=    num_dynamic_real_features
						__magic_name__							=    num_static_real_features
						__magic_name__							=    num_static_categorical_features
						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`'      )
											__magic_name__							=    cardinality
						else:
											__magic_name__							=    [0]
						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`'      )
											__magic_name__							=    embedding_dimension
						else:
											__magic_name__							=    [min(50  , (cat + 1) // 2      ) for cat in self.cardinality]
						__magic_name__							=    num_parallel_samples

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

						__magic_name__							=    dropout
						__magic_name__							=    attention_dropout
						__magic_name__							=    activation_dropout
						__magic_name__							=    encoder_layerdrop
						__magic_name__							=    decoder_layerdrop

						__magic_name__							=    activation_function
						__magic_name__							=    init_std

						__magic_name__							=    use_cache

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







	@property
	def 	_SCREAMING_SNAKE_CASE							(   self: str      ):

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




