"""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


__lowerCAmelCase    :							Union[str, Any]													=						logging.get_logger(__name__)

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

class       a_      (     __UpperCamelCase ,		__UpperCamelCase			):
					UpperCamelCase_ :	Union[str, Any]			=    "resnet"
					UpperCamelCase_ :	Union[str, Any]			=    ["basic", "bottleneck"]




					def __init__(	self						:     List[Any]  ,						snake_case__						:     int=3  ,						snake_case__						:     Optional[Any]=64  ,						snake_case__						:     Union[str, Any]=[256, 512, 1024, 2048]  ,						snake_case__						:     Tuple=[3, 4, 6, 3]  ,						snake_case__						:     int="bottleneck"  ,						snake_case__						:     Any="relu"  ,						snake_case__						:     Union[str, Any]=False  ,						snake_case__						:     int=None  ,						snake_case__						:     List[str]=None  ,						**snake_case__						:     Tuple  ,						):
							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_      (     __UpperCamelCase			):
					UpperCamelCase_ :	Dict			=    version.parse("1.11"			)




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




					@property
					def 						_SCREAMING_SNAKE_CASE						(	self						:     int     ):
							return 1E-3





"""simple docstring"""




def 							_UpperCAmelCase		(       lowerCamelCase__			,  lowerCamelCase__     ):





		"""simple docstring"""




		while b:
				lowerCAmelCase__   ,					lowerCAmelCase__        =   b, a % b
		return a







def 							_UpperCAmelCase		(       lowerCamelCase__			,  lowerCamelCase__     ):





		"""simple docstring"""




		return a if b == 0 else euclidean_gcd_recursive(lowerCamelCase__			,  a % b     )







def 							_UpperCAmelCase		(       ):





		"""simple docstring"""




		print(f"""euclidean_gcd(3, 5) = {euclidean_gcd(3			,  5     )}"""     )
		print(f"""euclidean_gcd(5, 3) = {euclidean_gcd(5			,  3     )}"""     )
		print(f"""euclidean_gcd(1, 3) = {euclidean_gcd(1			,  3     )}"""     )
		print(f"""euclidean_gcd(3, 6) = {euclidean_gcd(3			,  6     )}"""     )
		print(f"""euclidean_gcd(6, 3) = {euclidean_gcd(6			,  3     )}"""     )

		print(f"""euclidean_gcd_recursive(3, 5) = {euclidean_gcd_recursive(3			,  5     )}"""     )
		print(f"""euclidean_gcd_recursive(5, 3) = {euclidean_gcd_recursive(5			,  3     )}"""     )
		print(f"""euclidean_gcd_recursive(1, 3) = {euclidean_gcd_recursive(1			,  3     )}"""     )
		print(f"""euclidean_gcd_recursive(3, 6) = {euclidean_gcd_recursive(3			,  6     )}"""     )
		print(f"""euclidean_gcd_recursive(6, 3) = {euclidean_gcd_recursive(6			,  3     )}"""     )


if __name__ == "__main__":
			main()




