



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          =       {
    '''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_		(  a__							):
       UpperCAmelCase__				:					Dict        =  "beit"
       def __init__(			self,			SCREAMING_SNAKE_CASE_=8192,			SCREAMING_SNAKE_CASE_=768,			SCREAMING_SNAKE_CASE_=12,			SCREAMING_SNAKE_CASE_=12,			SCREAMING_SNAKE_CASE_=3072,			SCREAMING_SNAKE_CASE_="gelu",			SCREAMING_SNAKE_CASE_=0.0,			SCREAMING_SNAKE_CASE_=0.0,			SCREAMING_SNAKE_CASE_=0.02,			SCREAMING_SNAKE_CASE_=1e-12,			SCREAMING_SNAKE_CASE_=224,			SCREAMING_SNAKE_CASE_=16,			SCREAMING_SNAKE_CASE_=3,			SCREAMING_SNAKE_CASE_=False,			SCREAMING_SNAKE_CASE_=False,			SCREAMING_SNAKE_CASE_=False,			SCREAMING_SNAKE_CASE_=False,			SCREAMING_SNAKE_CASE_=0.1,			SCREAMING_SNAKE_CASE_=0.1,			SCREAMING_SNAKE_CASE_=True,			SCREAMING_SNAKE_CASE_=[3, 5, 7, 11],			SCREAMING_SNAKE_CASE_=[1, 2, 3, 6],			SCREAMING_SNAKE_CASE_=True,			SCREAMING_SNAKE_CASE_=0.4,			SCREAMING_SNAKE_CASE_=256,			SCREAMING_SNAKE_CASE_=1,			SCREAMING_SNAKE_CASE_=False,			SCREAMING_SNAKE_CASE_=255,			**SCREAMING_SNAKE_CASE_,			)     ->		List[str]:
          super().__init__(**SCREAMING_SNAKE_CASE_       )

          UpperCamelCase    :  Optional[int]							=	vocab_size
          UpperCamelCase    :  Optional[int]							=	hidden_size
          UpperCamelCase    :  str							=	num_hidden_layers
          UpperCamelCase    :  Any							=	num_attention_heads
          UpperCamelCase    :  Tuple							=	intermediate_size
          UpperCamelCase    :  str							=	hidden_act
          UpperCamelCase    :  List[Any]							=	hidden_dropout_prob
          UpperCamelCase    :  Optional[Any]							=	attention_probs_dropout_prob
          UpperCamelCase    :  Optional[Any]							=	initializer_range
          UpperCamelCase    :  Tuple							=	layer_norm_eps

          UpperCamelCase    :  int							=	image_size
          UpperCamelCase    :  Tuple							=	patch_size
          UpperCamelCase    :  List[str]							=	num_channels
          UpperCamelCase    :  Tuple							=	use_mask_token
          UpperCamelCase    :  str							=	use_absolute_position_embeddings
          UpperCamelCase    :  Any							=	use_relative_position_bias
          UpperCamelCase    :  Optional[int]							=	use_shared_relative_position_bias
          UpperCamelCase    :  Optional[Any]							=	layer_scale_init_value
          UpperCamelCase    :  Optional[int]							=	drop_path_rate
          UpperCamelCase    :  Optional[int]							=	use_mean_pooling
          # decode head attributes (semantic segmentation)
          UpperCamelCase    :  Tuple							=	out_indices
          UpperCamelCase    :  Any							=	pool_scales
          # auxiliary head attributes (semantic segmentation)
          UpperCamelCase    :  List[Any]							=	use_auxiliary_head
          UpperCamelCase    :  Dict							=	auxiliary_loss_weight
          UpperCamelCase    :  Any							=	auxiliary_channels
          UpperCamelCase    :  Tuple							=	auxiliary_num_convs
          UpperCamelCase    :  List[str]							=	auxiliary_concat_input
          UpperCamelCase    :  List[Any]							=	semantic_loss_ignore_index






class 				lowerCAmelCase_		(  a__							):
       UpperCAmelCase__				:					int        =  version.parse("1.11"							)
       @property
       def 					snake_case_       (			self       )     ->		Mapping[str, Mapping[int, str]]:
          return OrderedDict(
              [
                  ('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'}),
              ]       )






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








def 		UpperCamelCase	(   snake_case__       :    int       ,     snake_case__       :    int	)	->     int:
   return int(input_a == input_a == 0	)
def 		UpperCamelCase	(   )	->     None:
   print('Truth Table of NOR Gate:'	)
   print('|   Input 1   |  Input 2  | Output |'	)
   print(F"""|      0      |    0      |  {nor_gate(0       ,     0	)}     |"""	)
   print(F"""|      0      |    1      |  {nor_gate(0       ,     1	)}     |"""	)
   print(F"""|      1      |    0      |  {nor_gate(1       ,     0	)}     |"""	)
   print(F"""|      1      |    1      |  {nor_gate(1       ,     1	)}     |"""	)


if __name__ == "__main__":
    import doctest

    doctest.testmod()
    main()



