





'''simple docstring'''

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


__lowerCAmelCase							:     Optional[int]		     =logging.get_logger(__name__)

__lowerCAmelCase							:     Dict		     ={
    "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     (	UpperCamelCase__    ):
 __lowercase       		=    """vit_mae"""
 def __init__(    self				:int						,	lowercase_				:Union[str, Any]=7_68						,	lowercase_				:Union[str, Any]=12						,	lowercase_				:int=12						,	lowercase_				:Union[str, Any]=30_72						,	lowercase_				:List[Any]="gelu"						,	lowercase_				:Union[str, Any]=0.0						,	lowercase_				:List[Any]=0.0						,	lowercase_				:int=0.0_2						,	lowercase_				:List[Any]=1E-12						,	lowercase_				:Optional[int]=2_24						,	lowercase_				:List[Any]=16						,	lowercase_				:int=3						,	lowercase_				:int=True						,	lowercase_				:Dict=16						,	lowercase_				:List[Any]=5_12						,	lowercase_				:List[str]=8						,	lowercase_				:Tuple=20_48						,	lowercase_				:Dict=0.7_5						,	lowercase_				:Dict=False						,	**lowercase_				:Optional[Any]						,	)->							int:
     super().__init__(**lowercase_							)

     A__    =      hidden_size
     A__    =      num_hidden_layers
     A__    =      num_attention_heads
     A__    =      intermediate_size
     A__    =      hidden_act
     A__    =      hidden_dropout_prob
     A__    =      attention_probs_dropout_prob
     A__    =      initializer_range
     A__    =      layer_norm_eps
     A__    =      image_size
     A__    =      patch_size
     A__    =      num_channels
     A__    =      qkv_bias
     A__    =      decoder_num_attention_heads
     A__    =      decoder_hidden_size
     A__    =      decoder_num_hidden_layers
     A__    =      decoder_intermediate_size
     A__    =      mask_ratio
     A__    =      norm_pix_loss










'''simple docstring'''

from .imports import is_tqdm_available


if is_tqdm_available():
  from tqdm.auto import tqdm as _tqdm

from ..state import PartialState





def 						UpperCamelCase    (							_lowerCamelCase : bool = True						,	*_lowerCamelCase : Optional[int]						,	**_lowerCamelCase : Optional[Any]	):
    if not is_tqdm_available():
        raise ImportError("Accelerate's `tqdm` module requires `tqdm` to be installed. Please run `pip install tqdm`."	)
    A__    =      False
    if main_process_only:
        A__    =      PartialState().local_process_index == 0
    return _tqdm(*_lowerCamelCase						,	**_lowerCamelCase						,	disable=_lowerCamelCase	)



