



'''simple docstring'''
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
from ...utils.backbone_utils import BackboneConfigMixin, get_aligned_output_features_output_indices


snake_case_					:      int    			=    logging.get_logger(__name__)

snake_case_					:      Optional[Any]    			=    {
    'microsoft/resnet-50': 'https://huggingface.co/microsoft/resnet-50/blob/main/config.json',
}






class 				lowercase__      (				lowercase		,   lowercase  ):
	lowercase__    							=     """resnet"""
	lowercase__    							=     ["""basic""", """bottleneck"""]





	def __init__(					self   :							Dict					,lowerCamelCase__   :							int=3					,lowerCamelCase__   :							Any=64					,lowerCamelCase__   :							int=[256, 512, 1024, 2048]					,lowerCamelCase__   :							Optional[Any]=[3, 4, 6, 3]					,lowerCamelCase__   :							Dict="bottleneck"					,lowerCamelCase__   :							str="relu"					,lowerCamelCase__   :							str=False					,lowerCamelCase__   :							int=None					,lowerCamelCase__   :							Optional[Any]=None					,**lowerCamelCase__   :							Optional[Any]					,):







							'''simple docstring'''
							super().__init__(**lowerCamelCase__					)
							if layer_type not in self.layer_types:
													raise ValueError(F'layer_type={layer_type} is not one of {",".join(self.layer_types					)}'					)
							_UpperCamelCase   :						Optional[int]												=  num_channels
							_UpperCamelCase   :						str												=  embedding_size
							_UpperCamelCase   :						Optional[Any]												=  hidden_sizes
							_UpperCamelCase   :						Union[str, Any]												=  depths
							_UpperCamelCase   :						List[Any]												=  layer_type
							_UpperCamelCase   :						Any												=  hidden_act
							_UpperCamelCase   :						int												=  downsample_in_first_stage
							_UpperCamelCase   :						Tuple												=  ['stem'] + [F'stage{idx}' for idx in range(1					,len(lowerCamelCase__					) + 1					)]
							_UpperCamelCase							,     _UpperCamelCase   :						str												=  get_aligned_output_features_output_indices(
							    out_features=lowerCamelCase__					,out_indices=lowerCamelCase__					,stage_names=self.stage_names					)






class 				lowercase__      (				lowercase  ):
	lowercase__    							=     version.parse("""1.11"""  )





	@property
	def       UpperCamelCase_    (					self   :							List[Any]					):







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





	@property
	def       UpperCamelCase_    (					self   :							str					):







							'''simple docstring'''
							return 1E-3







'''simple docstring'''
def A__       (	UpperCAmelCase_    ,    UpperCAmelCase_				):
						return int((input_a, input_a).count(0				) != 0				)






def A__       (	):
						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))


