






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


__UpperCamelCase   :   List[Any]      =    logging.get_logger(__name__)

__UpperCamelCase   :   str      =    {
    """sayakpaul/vit-msn-base""": """https://huggingface.co/sayakpaul/vit-msn-base/resolve/main/config.json""",
    # See all ViT MSN models at https://huggingface.co/models?filter=vit_msn
}


class 							__UpperCamelCase     (  _lowerCAmelCase ):
	__snake_case						:List[Any] =							'vit_msn'







	def __init__(	self   :				Optional[Any]							,					_lowerCAmelCase   :				List[Any]=768							,					_lowerCAmelCase   :				Union[str, Any]=12							,					_lowerCAmelCase   :				Optional[int]=12							,					_lowerCAmelCase   :				Dict=3072							,					_lowerCAmelCase   :				Any="gelu"							,					_lowerCAmelCase   :				str=0.0							,					_lowerCAmelCase   :				int=0.0							,					_lowerCAmelCase   :				Optional[Any]=0.02							,					_lowerCAmelCase   :				str=1e-06							,					_lowerCAmelCase   :				Optional[int]=224							,					_lowerCAmelCase   :				Any=16							,					_lowerCAmelCase   :				Union[str, Any]=3							,					_lowerCAmelCase   :				Dict=True							,					**_lowerCAmelCase   :				Optional[int]							,					)		->			Tuple:
		"""simple docstring"""







		super().__init__(**_lowerCAmelCase      )

		__lowercase   							=	hidden_size
		__lowercase   							=	num_hidden_layers
		__lowercase   							=	num_attention_heads
		__lowercase   							=	intermediate_size
		__lowercase   							=	hidden_act
		__lowercase   							=	hidden_dropout_prob
		__lowercase   							=	attention_probs_dropout_prob
		__lowercase   							=	initializer_range
		__lowercase   							=	layer_norm_eps
		__lowercase   							=	image_size
		__lowercase   							=	patch_size
		__lowercase   							=	num_channels
		__lowercase   							=	qkv_bias








from packaging import version

from .import_utils import is_accelerate_available


if is_accelerate_available():
  import accelerate






def    _A	(   lowerCamelCase ):
   if not is_accelerate_available():
      return method
   a__						:    List[Any]   		=	version.parse(accelerate.__version__ ).base_version
   if version.parse(lowerCamelCase ) < version.parse("0.17.0" ):
      return method

   def wrapper(self				,			*lowerCamelCase				,			**lowerCamelCase ):
      if hasattr(self				,			"_hf_hook" ) and hasattr(self._hf_hook				,			"pre_forward" ):
         self._hf_hook.pre_forward(self )
      return method(self				,			*lowerCamelCase				,			**lowerCamelCase )

   return wrapper

