



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


lowercase_	       =			logging.get_logger(__name__)

lowercase_	       =			{
    '''microsoft/resnet-50''': '''https://huggingface.co/microsoft/resnet-50/blob/main/config.json''',
}






class 						__a (     SCREAMING_SNAKE_CASE	,    SCREAMING_SNAKE_CASE				):
	SCREAMING_SNAKE_CASE       =       "resnet"
	SCREAMING_SNAKE_CASE       =       ["basic", "bottleneck"]



	def __init__(						self							:    Any				,	snake_case_							:    Dict=3				,	snake_case_							:    Optional[int]=64				,	snake_case_							:    Any=[2_56, 5_12, 10_24, 20_48]				,	snake_case_							:    List[Any]=[3, 4, 6, 3]				,	snake_case_							:    Any="bottleneck"				,	snake_case_							:    List[str]="relu"				,	snake_case_							:    Optional[Any]=False				,	snake_case_							:    Dict=None				,	snake_case_							:    List[Any]=None				,	**snake_case_							:    Optional[int]				,	)->							Dict:
						super().__init__(**snake_case_)
						if layer_type not in self.layer_types:
											raise ValueError(F"""layer_type={layer_type} is not one of {','.join(self.layer_types)}""")
						__lowerCAmelCase	   =num_channels
						__lowerCAmelCase	   =embedding_size
						__lowerCAmelCase	   =hidden_sizes
						__lowerCAmelCase	   =depths
						__lowerCAmelCase	   =layer_type
						__lowerCAmelCase	   =hidden_act
						__lowerCAmelCase	   =downsample_in_first_stage
						__lowerCAmelCase	   =["""stem"""] + [F"""stage{idx}""" for idx in range(1				,	len(snake_case_) + 1)]
						__lowerCAmelCase   ,	__lowerCAmelCase	   =get_aligned_output_features_output_indices(
						    out_features=snake_case_				,	out_indices=snake_case_				,	stage_names=self.stage_names)







class 						__a (     SCREAMING_SNAKE_CASE				):
	SCREAMING_SNAKE_CASE       =       version.parse("1.11"				)



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



	@property
	def 		UpperCamelCase							(						self							:    Union[str, Any])->							float:
						return 1e-3









def 					__lowerCAmelCase		(  )  ->						Tuple:
					__lowerCAmelCase	   =[]
					__lowerCAmelCase	   =1

					while len(__lowerCamelCase	) < 1E6:
										constant.append(str(__lowerCamelCase	)	)
										i += 1

					__lowerCAmelCase	   ="""""".join(__lowerCamelCase	)

					return (
					    int(constant[0]	)
					    * int(constant[9]	)
					    * int(constant[99]	)
					    * int(constant[999]	)
					    * int(constant[9999]	)
					    * int(constant[99999]	)
					    * int(constant[999999]	)
					)


if __name__ == "__main__":
				print(solution())




