




"""simple docstring"""
from ...configuration_utils import PretrainedConfig
from ...utils import logging


a_				:    List[str]										=     logging.get_logger(__name__)

a_				:    Optional[int]										=     {
    '''transfo-xl-wt103''': '''https://huggingface.co/transfo-xl-wt103/resolve/main/config.json''',
}

class __lowercase(      lowercase__				):




					'''simple docstring'''


					__a						:						List[Any]     		= 'transfo-xl'
					__a						:						str     		= ['mems']
					__a						:						Any     		= {
					    'n_token': 'vocab_size',
					    'hidden_size': 'd_model',
					    'num_attention_heads': 'n_head',
					    'num_hidden_layers': 'n_layer',
					}
					def __init__(    self						,	__a=267735						,	__a=[20000, 40000, 200000]						,	__a=1024						,	__a=1024						,	__a=16						,	__a=64						,	__a=4096						,	__a=4						,	__a=False						,	__a=18						,	__a=1600						,	__a=1000						,	__a=True						,	__a=True						,	__a=0						,	__a=-1						,	__a=True						,	__a=0.1						,	__a=0.0						,	__a=True						,	__a="normal"						,	__a=0.01						,	__a=0.01						,	__a=0.02						,	__a=1E-5						,	__a=0						,	**__a						,	):
								__lowerCamelCase					:	Dict	       =				vocab_size
								__lowerCamelCase					:	Tuple	       =				[]
								self.cutoffs.extend(__a     )
								if proj_share_all_but_first:
											__lowerCamelCase					:	List[Any]	       =				[False] + [True] * len(self.cutoffs     )
								else:
											__lowerCamelCase					:	Dict	       =				[False] + [False] * len(self.cutoffs     )
								__lowerCamelCase					:	int	       =				d_model
								__lowerCamelCase					:	Any	       =				d_embed
								__lowerCamelCase					:	Any	       =				d_head
								__lowerCamelCase					:	Tuple	       =				d_inner
								__lowerCamelCase					:	Dict	       =				div_val
								__lowerCamelCase					:	Dict	       =				pre_lnorm
								__lowerCamelCase					:	Tuple	       =				n_layer
								__lowerCamelCase					:	int	       =				n_head
								__lowerCamelCase					:	Optional[int]	       =				mem_len
								__lowerCamelCase					:	Optional[Any]	       =				same_length
								__lowerCamelCase					:	Any	       =				attn_type
								__lowerCamelCase					:	int	       =				clamp_len
								__lowerCamelCase					:	Dict	       =				sample_softmax
								__lowerCamelCase					:	Optional[Any]	       =				adaptive
								__lowerCamelCase					:	Any	       =				dropout
								__lowerCamelCase					:	List[str]	       =				dropatt
								__lowerCamelCase					:	Union[str, Any]	       =				untie_r
								__lowerCamelCase					:	Any	       =				init
								__lowerCamelCase					:	Union[str, Any]	       =				init_range
								__lowerCamelCase					:	Union[str, Any]	       =				proj_init_std
								__lowerCamelCase					:	Union[str, Any]	       =				init_std
								__lowerCamelCase					:	List[Any]	       =				layer_norm_epsilon
								super().__init__(eos_token_id=__a						,	**__a     )
					@property
					def     snake_case_				(    self     ):
								# Message copied from Transformer-XL documentation
								logger.info(f'''The model {self.model_type} is one of the few models that has no sequence length limit.'''     )
								return -1





					@max_position_embeddings.setter
					def     snake_case_				(    self						,	__a     ):
								# Message copied from Transformer-XL documentation
								raise NotImplementedError(
								    f'''The model {self.model_type} is one of the few models that has no sequence length limit.'''     )









"""simple docstring"""
from cva import destroyAllWindows, imread, imshow, waitKey





def 						UpperCAmelCase				(			A__:    Tuple     )  ->     Union[str, Any]:
			# getting number of pixels in the image
			__lowerCamelCase       ,      __lowerCamelCase					:	Optional[Any]	       =				img.shape[0], img.shape[1]

			# converting each pixel's color to its negative
			for i in range(A__     ):
						for j in range(A__     ):
									__lowerCamelCase					:	Optional[Any]	       =				[255, 255, 255] - img[i][j]

			return img


if __name__ == "__main__":
					# read original image
					a_				:    Dict										=     imread('''image_data/lena.jpg''', 1)

					# convert to its negative
					a_				:    str										=     convert_to_negative(img)

					# show result image
					imshow('''negative of original image''', img)
					waitKey(0)
					destroyAllWindows()



