


from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


lowerCAmelCase__      		= {'configuration_focalnet': ['FOCALNET_PRETRAINED_CONFIG_ARCHIVE_MAP', 'FocalNetConfig']}


try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    lowerCAmelCase__      		= [
        'FOCALNET_PRETRAINED_MODEL_ARCHIVE_LIST',
        'FocalNetForImageClassification',
        'FocalNetForMaskedImageModeling',
        'FocalNetBackbone',
        'FocalNetModel',
        'FocalNetPreTrainedModel',
    ]

if TYPE_CHECKING:
    from .configuration_focalnet import FOCALNET_PRETRAINED_CONFIG_ARCHIVE_MAP, FocalNetConfig

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_focalnet import (
            FOCALNET_PRETRAINED_MODEL_ARCHIVE_LIST,
            FocalNetBackbone,
            FocalNetForImageClassification,
            FocalNetForMaskedImageModeling,
            FocalNetModel,
            FocalNetPreTrainedModel,
        )

else:
    import sys

    lowerCAmelCase__      		= _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)




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


lowerCAmelCase__      		= logging.get_logger(__name__)

lowerCAmelCase__      		= {
    '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      lowerCAmelCase__       (				a):




     '''simple docstring'''
     __SCREAMING_SNAKE_CASE  			= "vit_mae"


     def __init__(						self ,						__lowerCamelCase=7_6_8 ,						__lowerCamelCase=1_2 ,						__lowerCamelCase=1_2 ,						__lowerCamelCase=3_0_7_2 ,						__lowerCamelCase="gelu" ,						__lowerCamelCase=0.0 ,						__lowerCamelCase=0.0 ,						__lowerCamelCase=0.0_2 ,						__lowerCamelCase=1e-12 ,						__lowerCamelCase=2_2_4 ,						__lowerCamelCase=1_6 ,						__lowerCamelCase=3 ,						__lowerCamelCase=True ,						__lowerCamelCase=1_6 ,						__lowerCamelCase=5_1_2 ,						__lowerCamelCase=8 ,						__lowerCamelCase=2_0_4_8 ,						__lowerCamelCase=0.7_5 ,						__lowerCamelCase=False ,						**__lowerCamelCase ,						)			->				int:
            super().__init__(**__lowerCamelCase)

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