



"""simple docstring"""







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


lowercase__		:				Any          =	logging.get_logger(__name__)

lowercase__		:				Optional[Any]          =	{
    "facebook/vit-mae-base": "https://huggingface.co/facebook/vit-mae-base/resolve/main/config.json",
    # See all ViT MAE models at https://huggingface.co/models?filter=vit-mae
}







class       UpperCamelCase__   (	lowerCAmelCase_  ):




      """simple docstring"""




      _SCREAMING_SNAKE_CASE  				=     """vit_mae"""



      def __init__(      self				:      Optional[int]    ,			SCREAMING_SNAKE_CASE_				:      Any=7_6_8    ,			SCREAMING_SNAKE_CASE_				:      Any=1_2    ,			SCREAMING_SNAKE_CASE_				:      Optional[Any]=1_2    ,			SCREAMING_SNAKE_CASE_				:      str=3_0_7_2    ,			SCREAMING_SNAKE_CASE_				:      Optional[int]="gelu"    ,			SCREAMING_SNAKE_CASE_				:      Optional[int]=0.0    ,			SCREAMING_SNAKE_CASE_				:      Optional[Any]=0.0    ,			SCREAMING_SNAKE_CASE_				:      Union[str, Any]=0.02    ,			SCREAMING_SNAKE_CASE_				:      Union[str, Any]=1E-12    ,			SCREAMING_SNAKE_CASE_				:      Dict=2_2_4    ,			SCREAMING_SNAKE_CASE_				:      str=1_6    ,			SCREAMING_SNAKE_CASE_				:      str=3    ,			SCREAMING_SNAKE_CASE_				:      List[str]=True    ,			SCREAMING_SNAKE_CASE_				:      List[str]=1_6    ,			SCREAMING_SNAKE_CASE_				:      Tuple=5_1_2    ,			SCREAMING_SNAKE_CASE_				:      Union[str, Any]=8    ,			SCREAMING_SNAKE_CASE_				:      Optional[int]=2_0_4_8    ,			SCREAMING_SNAKE_CASE_				:      Union[str, Any]=0.75    ,			SCREAMING_SNAKE_CASE_				:      Any=False    ,			**SCREAMING_SNAKE_CASE_				:      Dict    ,			):
        super().__init__(**SCREAMING_SNAKE_CASE_       )

        lowerCAmelCase_   :				Tuple								= hidden_size
        lowerCAmelCase_   :				Dict								= num_hidden_layers
        lowerCAmelCase_   :				Tuple								= num_attention_heads
        lowerCAmelCase_   :				Optional[Any]								= intermediate_size
        lowerCAmelCase_   :				str								= hidden_act
        lowerCAmelCase_   :				Optional[int]								= hidden_dropout_prob
        lowerCAmelCase_   :				Optional[Any]								= attention_probs_dropout_prob
        lowerCAmelCase_   :				Dict								= initializer_range
        lowerCAmelCase_   :				Tuple								= layer_norm_eps
        lowerCAmelCase_   :				Dict								= image_size
        lowerCAmelCase_   :				Optional[int]								= patch_size
        lowerCAmelCase_   :				Optional[int]								= num_channels
        lowerCAmelCase_   :				Optional[int]								= qkv_bias
        lowerCAmelCase_   :				Union[str, Any]								= decoder_num_attention_heads
        lowerCAmelCase_   :				Any								= decoder_hidden_size
        lowerCAmelCase_   :				Any								= decoder_num_hidden_layers
        lowerCAmelCase_   :				Dict								= decoder_intermediate_size
        lowerCAmelCase_   :				Union[str, Any]								= mask_ratio
        lowerCAmelCase_   :				List[Any]								= norm_pix_loss










"""simple docstring"""






from __future__ import annotations






def      snake_case__   (		__lowerCamelCase				:    int							,		__lowerCamelCase				:    int	):
			"""simple docstring"""
			if b == 0:
						return (1, 0)
			((lowerCamelCase__)	,   (lowerCamelCase__))		:		Any			=extended_euclid(__lowerCamelCase							,		a % b	)
			lowerCamelCase__		:		Optional[Any]			=a // b
			return (y, x - k * y)






def      snake_case__   (		__lowerCamelCase				:    int							,		__lowerCamelCase				:    int							,		__lowerCamelCase				:    int							,		__lowerCamelCase				:    int	):
			"""simple docstring"""
			((lowerCamelCase__)	,   (lowerCamelCase__))		:		Any			=extended_euclid(__lowerCamelCase							,		__lowerCamelCase	)
			lowerCamelCase__		:		List[Any]			=na * na
			lowerCamelCase__		:		Union[str, Any]			=ra * x * na + ra * y * na
			return (n % m + m) % m






def      snake_case__   (		__lowerCamelCase				:    int							,		__lowerCamelCase				:    int	):
			"""simple docstring"""
			((lowerCamelCase__)	,   (lowerCamelCase__))		:		int			=extended_euclid(__lowerCamelCase							,		__lowerCamelCase	)
			if b < 0:
						lowerCamelCase__		:		Any			=(b % n + n) % n
			return b






def      snake_case__   (		__lowerCamelCase				:    int							,		__lowerCamelCase				:    int							,		__lowerCamelCase				:    int							,		__lowerCamelCase				:    int	):
			"""simple docstring"""
			lowerCamelCase__	,   lowerCamelCase__		:		Any			=invert_modulo(__lowerCamelCase							,		__lowerCamelCase	), invert_modulo(__lowerCamelCase							,		__lowerCamelCase	)
			lowerCamelCase__		:		Tuple			=na * na
			lowerCamelCase__		:		Optional[Any]			=ra * x * na + ra * y * na
			return (n % m + m) % m


if __name__ == "__main__":
		from doctest import testmod

		testmod(name="chinese_remainder_theorem", verbose=True)
		testmod(name="chinese_remainder_theorem2", verbose=True)
		testmod(name="invert_modulo", verbose=True)
		testmod(name="extended_euclid", verbose=True)




