






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 : int						   =       logging.get_logger(__name__)

lowerCamelCase : Any						   =       {
    '''facebook/levit-128S''': '''https://huggingface.co/facebook/levit-128S/resolve/main/config.json''',
    # See all LeViT models at https://huggingface.co/models?filter=levit
}

class 		lowerCAmelCase     ( __lowerCamelCase			):

					'''simple docstring'''

					_A						:			Any									=      '''levit'''



					def __init__(  self				:	str		,     __a				:	Tuple=224		,     __a				:	List[Any]=3		,     __a				:	Any=3		,     __a				:	str=2		,     __a				:	List[str]=1		,     __a				:	str=16		,     __a				:	List[Any]=[128, 256, 384]		,     __a				:	str=[4, 8, 12]		,     __a				:	Dict=[4, 4, 4]		,     __a				:	List[Any]=[16, 16, 16]		,     __a				:	Tuple=0		,     __a				:	Tuple=[2, 2, 2]		,     __a				:	Union[str, Any]=[2, 2, 2]		,     __a				:	str=0.02		,     **__a				:	Any		,     )			->  List[str]:


												"""simple docstring"""

												super().__init__(**a_							)
												__lowercase      :							Optional[Any]				=     image_size
												__lowercase      :							int				=     num_channels
												__lowercase      :							Tuple				=     kernel_size
												__lowercase      :							List[Any]				=     stride
												__lowercase      :							Optional[Any]				=     padding
												__lowercase      :							List[str]				=     hidden_sizes
												__lowercase      :							Tuple				=     num_attention_heads
												__lowercase      :							Dict				=     depths
												__lowercase      :							Optional[Any]				=     key_dim
												__lowercase      :							List[str]				=     drop_path_rate
												__lowercase      :							Optional[Any]				=     patch_size
												__lowercase      :							Union[str, Any]				=     attention_ratio
												__lowercase      :							Optional[int]				=     mlp_ratio
												__lowercase      :							List[Any]				=     initializer_range
												__lowercase      :							Tuple				=     [
												    ["Subsample", key_dim[0], hidden_sizes[0] // key_dim[0], 4, 2, 2],
												    ["Subsample", key_dim[0], hidden_sizes[1] // key_dim[0], 4, 2, 2],
												]







class 		lowerCAmelCase     ( __lowerCamelCase			):

					'''simple docstring'''

					_A						:			Any									=      version.parse('''1.11'''			)



					@property
					def       lowerCAmelCase				(  self				:	Union[str, Any]							)			->  Any:


												"""simple docstring"""

												return OrderedDict(
												    [
												        ("""pixel_values""", {0: """batch""", 1: """num_channels""", 2: """height""", 3: """width"""}),
												    ]							)



					@property
					def       lowerCAmelCase				(  self				:	Optional[Any]							)			->  str:


												"""simple docstring"""

												return 1E-4







def       snake_case_		(     lowerCAmelCase_       :						int       ,       lowerCAmelCase_       :						int      ):
							return int((input_a, input_a).count(0      ) == 0      )
def       snake_case_		(     ):
							assert and_gate(0       ,       0      ) == 0
							assert and_gate(0       ,       1      ) == 0
							assert and_gate(1       ,       0      ) == 0
							assert and_gate(1       ,       1      ) == 1


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