





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


UpperCAmelCase_      							=     logging.get_logger(__name__)

UpperCAmelCase_      							=     {
    '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 			UpperCamelCase_		(  _A					):
     lowerCAmelCase_							=	'''vit'''




     def __init__(		self				,						lowerCAmelCase_=768				,						lowerCAmelCase_=12				,						lowerCAmelCase_=12				,						lowerCAmelCase_=3072				,						lowerCAmelCase_="gelu"				,						lowerCAmelCase_=0.0				,						lowerCAmelCase_=0.0				,						lowerCAmelCase_=0.02				,						lowerCAmelCase_=1E-12				,						lowerCAmelCase_=224				,						lowerCAmelCase_=16				,						lowerCAmelCase_=3				,						lowerCAmelCase_=True				,						lowerCAmelCase_=16				,						**lowerCAmelCase_				,						)		->							int:
          super().__init__(**UpperCamelCase__  )

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





class 			UpperCamelCase_		(  _A					):
     lowerCAmelCase_							=	version.parse('''1.11'''					)




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






     @property
     def 	lowerCAmelCase			(		self  )		->							float:
          return 1E-4










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


UpperCAmelCase_      							=     logging.get_logger(__name__)

UpperCAmelCase_      							=     {
    """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					):
					lowerCAmelCase_							=	'''vit_msn'''




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

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



