




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


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

lowerCamelCase__			:       Tuple         =							{
    """microsoft/beit-base-patch16-224-pt22k""": (
        """https://huggingface.co/microsoft/beit-base-patch16-224-pt22k/resolve/main/config.json"""
    ),
    # See all BEiT models at https://huggingface.co/models?filter=beit
}





class 	lowerCamelCase_							(				__snake_case ):


	'''simple docstring'''







	lowercase_       =   "beit"



	def __init__(							self  :		List[str]    ,    _lowerCAmelCase  :		Union[str, Any]=8_192    ,    _lowerCAmelCase  :		Any=768    ,    _lowerCAmelCase  :		int=12    ,    _lowerCAmelCase  :		str=12    ,    _lowerCAmelCase  :		Tuple=3_072    ,    _lowerCAmelCase  :		str="gelu"    ,    _lowerCAmelCase  :		Tuple=0.0    ,    _lowerCAmelCase  :		List[Any]=0.0    ,    _lowerCAmelCase  :		Optional[int]=0.02    ,    _lowerCAmelCase  :		int=1E-12    ,    _lowerCAmelCase  :		str=224    ,    _lowerCAmelCase  :		Any=16    ,    _lowerCAmelCase  :		str=3    ,    _lowerCAmelCase  :		Tuple=False    ,    _lowerCAmelCase  :		Optional[int]=False    ,    _lowerCAmelCase  :		Optional[int]=False    ,    _lowerCAmelCase  :		Union[str, Any]=False    ,    _lowerCAmelCase  :		Union[str, Any]=0.1    ,    _lowerCAmelCase  :		List[str]=0.1    ,    _lowerCAmelCase  :		Any=True    ,    _lowerCAmelCase  :		Optional[Any]=[3, 5, 7, 11]    ,    _lowerCAmelCase  :		Any=[1, 2, 3, 6]    ,    _lowerCAmelCase  :		str=True    ,    _lowerCAmelCase  :		Dict=0.4    ,    _lowerCAmelCase  :		List[Any]=256    ,    _lowerCAmelCase  :		int=1    ,    _lowerCAmelCase  :		Optional[Any]=False    ,    _lowerCAmelCase  :		Tuple=255    ,    **_lowerCAmelCase  :		Tuple    ,    ):
							super().__init__(**a_						)

							SCREAMING_SNAKE_CASE_     						=      vocab_size
							SCREAMING_SNAKE_CASE_     						=      hidden_size
							SCREAMING_SNAKE_CASE_     						=      num_hidden_layers
							SCREAMING_SNAKE_CASE_     						=      num_attention_heads
							SCREAMING_SNAKE_CASE_     						=      intermediate_size
							SCREAMING_SNAKE_CASE_     						=      hidden_act
							SCREAMING_SNAKE_CASE_     						=      hidden_dropout_prob
							SCREAMING_SNAKE_CASE_     						=      attention_probs_dropout_prob
							SCREAMING_SNAKE_CASE_     						=      initializer_range
							SCREAMING_SNAKE_CASE_     						=      layer_norm_eps

							SCREAMING_SNAKE_CASE_     						=      image_size
							SCREAMING_SNAKE_CASE_     						=      patch_size
							SCREAMING_SNAKE_CASE_     						=      num_channels
							SCREAMING_SNAKE_CASE_     						=      use_mask_token
							SCREAMING_SNAKE_CASE_     						=      use_absolute_position_embeddings
							SCREAMING_SNAKE_CASE_     						=      use_relative_position_bias
							SCREAMING_SNAKE_CASE_     						=      use_shared_relative_position_bias
							SCREAMING_SNAKE_CASE_     						=      layer_scale_init_value
							SCREAMING_SNAKE_CASE_     						=      drop_path_rate
							SCREAMING_SNAKE_CASE_     						=      use_mean_pooling
							# decode head attributes (semantic segmentation)
							SCREAMING_SNAKE_CASE_     						=      out_indices
							SCREAMING_SNAKE_CASE_     						=      pool_scales
							# auxiliary head attributes (semantic segmentation)
							SCREAMING_SNAKE_CASE_     						=      use_auxiliary_head
							SCREAMING_SNAKE_CASE_     						=      auxiliary_loss_weight
							SCREAMING_SNAKE_CASE_     						=      auxiliary_channels
							SCREAMING_SNAKE_CASE_     						=      auxiliary_num_convs
							SCREAMING_SNAKE_CASE_     						=      auxiliary_concat_input
							SCREAMING_SNAKE_CASE_     						=      semantic_loss_ignore_index





class 	lowerCamelCase_							(				__snake_case ):


	'''simple docstring'''







	lowercase_       =   version.parse("1.11" )



	@property
	def 				lowerCAmelCase_  (							self  :		Optional[int]						):
							return OrderedDict(
							    [
							        ('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'}),
							    ]						)




	@property
	def 				lowerCAmelCase_  (							self  :		List[Any]						):
							return 1E-4





def  UpperCAmelCase_							(				__UpperCAmelCase						:     int      ,      __UpperCAmelCase						:     int							) ->			int:
      return int((input_a, input_a).count(0							) != 0							)

def  UpperCAmelCase_							(				) ->			None:
      assert nand_gate(0      ,      0							) == 1
      assert nand_gate(0      ,      1							) == 1
      assert nand_gate(1      ,      0							) == 1
      assert nand_gate(1      ,      1							) == 0


if __name__ == "__main__":
   print(nand_gate(0, 0))
   print(nand_gate(0, 1))
   print(nand_gate(1, 0))
   print(nand_gate(1, 1))