


"""simple docstring"""






from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


__snake_case		=   logging.get_logger(__name__)

__snake_case		=   {
    '''google/vit-base-patch16-224''': '''https://huggingface.co/vit-base-patch16-224/resolve/main/config.json''',
    # See all ViT models at https://huggingface.co/models?filter=vit
}


class     __lowerCamelCase  (					a__				):

     '''simple docstring'''
     A_       :	Optional[int]    =		'vit'


     def __init__(      self    ,				__UpperCAmelCase=768    ,				__UpperCAmelCase=12    ,				__UpperCAmelCase=12    ,				__UpperCAmelCase=3072    ,				__UpperCAmelCase="gelu"    ,				__UpperCAmelCase=0.0    ,				__UpperCAmelCase=0.0    ,				__UpperCAmelCase=0.02    ,				__UpperCAmelCase=1e-1_2    ,				__UpperCAmelCase=224    ,				__UpperCAmelCase=16    ,				__UpperCAmelCase=3    ,				__UpperCAmelCase=True    ,				__UpperCAmelCase=16    ,				**__UpperCAmelCase    ,				)       ->							str:
          super().__init__(**__UpperCAmelCase							)

          _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    	=				encoder_stride







class     __lowerCamelCase  (					a__				):

     '''simple docstring'''
     A_       :	Dict    =		version.parse('1.11'				)


     @property
     def 							_UpperCAmelCase      (      self							)       ->							Mapping[str, Mapping[int, str]]:
          return OrderedDict(
              [
                  ('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''}),
              ]							)





     @property
     def 							_UpperCAmelCase      (      self							)       ->							float:
          return 1e-4



"""simple docstring"""






from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_torch_available,
)


__snake_case		=       {'''configuration_vit_mae''': ['''VIT_MAE_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''ViTMAEConfig''']}

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   __snake_case		=       [
       '''VIT_MAE_PRETRAINED_MODEL_ARCHIVE_LIST''',
       '''ViTMAEForPreTraining''',
       '''ViTMAELayer''',
       '''ViTMAEModel''',
       '''ViTMAEPreTrainedModel''',
   ]

try:
   if not is_tf_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   __snake_case		=       [
       '''TFViTMAEForPreTraining''',
       '''TFViTMAEModel''',
       '''TFViTMAEPreTrainedModel''',
   ]

if TYPE_CHECKING:
   from .configuration_vit_mae import VIT_MAE_PRETRAINED_CONFIG_ARCHIVE_MAP, ViTMAEConfig

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_vit_mae import (
          VIT_MAE_PRETRAINED_MODEL_ARCHIVE_LIST,
          ViTMAEForPreTraining,
          ViTMAELayer,
          ViTMAEModel,
          ViTMAEPreTrainedModel,
      )

   try:
      if not is_tf_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_tf_vit_mae import TFViTMAEForPreTraining, TFViTMAEModel, TFViTMAEPreTrainedModel


else:
   import sys

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