'''simple docstring'''



from ...configuration_utils import PretrainedConfig
from ...utils import logging


_lowercase      :      Optional[Any]            =					logging.get_logger(__name__)






class 	UpperCamelCase__(       __SCREAMING_SNAKE_CASE	):
				__magic_name__    :				Union[str, Any]  		=	"timm_backbone"




				def __init__(		self      :			List[Any]				,   lowerCAmelCase      :			Optional[int]=None				,   lowerCAmelCase      :			Optional[int]=3				,   lowerCAmelCase      :			Tuple=True				,   lowerCAmelCase      :			Tuple=True				,   lowerCAmelCase      :			Dict=None				,   **lowerCAmelCase      :			Dict				,   )->					Any:

										"""simple docstring"""




										super().__init__(**_snake_case				)
										UpperCAmelCase					    =     backbone
										UpperCAmelCase					    =     num_channels
										UpperCAmelCase					    =     features_only
										UpperCAmelCase					    =     use_pretrained_backbone
										UpperCAmelCase					    =     True
										UpperCAmelCase					    =     out_indices if out_indices is not None else (-1,)









'''simple docstring'''



def 				lowerCamelCase__				(	A       :      int				,       A       :      int					):




						'''simple docstring'''






						while a != 0:
												UpperCAmelCase    ,    UpperCAmelCase					    =     b % a, a
						return b




def 				lowerCamelCase__				(	A       :      int				,       A       :      int					):




						'''simple docstring'''






						if gcd(A				,       A					) != 1:
												UpperCAmelCase					    =     f"""mod inverse of {a!r} and {m!r} does not exist"""
												raise ValueError(A					)
						UpperCAmelCase    ,    UpperCAmelCase    ,    UpperCAmelCase					    =     1, 0, a
						UpperCAmelCase    ,    UpperCAmelCase    ,    UpperCAmelCase					    =     0, 1, m
						while va != 0:
												UpperCAmelCase					    =     ua // va
												UpperCAmelCase    ,    UpperCAmelCase    ,    UpperCAmelCase    ,    UpperCAmelCase    ,    UpperCAmelCase    ,    UpperCAmelCase					    =     (ua - q * va), (ua - q * va), (ua - q * va), va, va, va
						return ua % m





