



"""simple docstring"""
import argparse
import json

import requests
import timm
import torch
from huggingface_hub import hf_hub_download
from PIL import Image

from transformers import AutoImageProcessor, SwinConfig, SwinForImageClassification
def    A_  (			_lowercase	):







						'''simple docstring'''


						snake_case_ :Any						=			SwinConfig()
						snake_case_ :List[str]						=			swin_name.split("""_"""	)

						snake_case_ :Optional[Any]						=			name_split[1]
						snake_case_ :Union[str, Any]						=			int(name_split[4]	)
						snake_case_ :List[Any]						=			int(name_split[3][-1]	)

						if model_size == "tiny":
												snake_case_ :Union[str, Any]						=			96
												snake_case_ :Dict						=			(2, 2, 6, 2)
												snake_case_ :List[str]						=			(3, 6, 12, 24)
						elif model_size == "small":
												snake_case_ :str						=			96
												snake_case_ :List[str]						=			(2, 2, 18, 2)
												snake_case_ :Optional[Any]						=			(3, 6, 12, 24)
						elif model_size == "base":
												snake_case_ :str						=			128
												snake_case_ :List[Any]						=			(2, 2, 18, 2)
												snake_case_ :Union[str, Any]						=			(4, 8, 16, 32)
						else:
												snake_case_ :str						=			192
												snake_case_ :Union[str, Any]						=			(2, 2, 18, 2)
												snake_case_ :Optional[int]						=			(6, 12, 24, 48)

						if "in22k" in swin_name:
												snake_case_ :Union[str, Any]						=			21841
						else:
												snake_case_ :List[Any]						=			1000
												snake_case_ :Any						=			"""huggingface/label-files"""
												snake_case_ :Dict						=			"""imagenet-1k-id2label.json"""
												snake_case_ :List[Any]						=			json.load(open(hf_hub_download(_lowercase,					_lowercase,					repo_type="""dataset"""	),					"""r"""	)	)
												snake_case_ :Optional[int]						=			{int(_lowercase	): v for k, v in idalabel.items()}
												snake_case_ :List[Any]						=			idalabel
												snake_case_ :Any						=			{v: k for k, v in idalabel.items()}

						snake_case_ :List[str]						=			img_size
						snake_case_ :Optional[Any]						=			num_classes
						snake_case_ :List[Any]						=			embed_dim
						snake_case_ :Dict						=			depths
						snake_case_ :List[Any]						=			num_heads
						snake_case_ :List[str]						=			window_size

						return config
def    A_  (			_lowercase	):







						'''simple docstring'''


						if "patch_embed.proj" in name:
												snake_case_ :Union[str, Any]						=			name.replace("""patch_embed.proj""",					"""embeddings.patch_embeddings.projection"""	)
						if "patch_embed.norm" in name:
												snake_case_ :Tuple						=			name.replace("""patch_embed.norm""",					"""embeddings.norm"""	)
						if "layers" in name:
												snake_case_ :List[Any]						=			"""encoder.""" + name
						if "attn.proj" in name:
												snake_case_ :Dict						=			name.replace("""attn.proj""",					"""attention.output.dense"""	)
						if "attn" in name:
												snake_case_ :int						=			name.replace("""attn""",					"""attention.self"""	)
						if "norm1" in name:
												snake_case_ :Dict						=			name.replace("""norm1""",					"""layernorm_before"""	)
						if "norm2" in name:
												snake_case_ :Optional[int]						=			name.replace("""norm2""",					"""layernorm_after"""	)
						if "mlp.fc1" in name:
												snake_case_ :Any						=			name.replace("""mlp.fc1""",					"""intermediate.dense"""	)
						if "mlp.fc2" in name:
												snake_case_ :List[str]						=			name.replace("""mlp.fc2""",					"""output.dense"""	)

						if name == "norm.weight":
												snake_case_ :List[str]						=			"""layernorm.weight"""
						if name == "norm.bias":
												snake_case_ :Union[str, Any]						=			"""layernorm.bias"""

						if "head" in name:
												snake_case_ :Dict						=			name.replace("""head""",					"""classifier"""	)
						else:
												snake_case_ :Dict						=			"""swin.""" + name

						return name
def    A_  (			_lowercase,					_lowercase	):







						'''simple docstring'''


						for key in orig_state_dict.copy().keys():
												snake_case_ :List[Any]						=			orig_state_dict.pop(_lowercase	)

												if "mask" in key:
																		continue
												elif "qkv" in key:
																		snake_case_ :Any						=			key.split("""."""	)
																		snake_case_ :int						=			int(key_split[1]	)
																		snake_case_ :str						=			int(key_split[3]	)
																		snake_case_ :Dict						=			model.swin.encoder.layers[layer_num].blocks[block_num].attention.self.all_head_size

																		if "weight" in key:
																								snake_case_ :int						=			val[:dim, :]
																								snake_case_ :Any						=			val[
																								    dim : dim * 2, :
																								]
																								snake_case_ :List[Any]						=			val[-dim:, :]
																		else:
																								snake_case_ :Any						=			val[
																								    :dim
																								]
																								snake_case_ :str						=			val[
																								    dim : dim * 2
																								]
																								snake_case_ :Any						=			val[
																								    -dim:
																								]
												else:
																		snake_case_ :Optional[Any]						=			val

						return orig_state_dict
def    A_  (			_lowercase,					_lowercase	):







						'''simple docstring'''


						snake_case_ :Optional[int]						=			timm.create_model(_lowercase,					pretrained=_lowercase	)
						timm_model.eval()

						snake_case_ :int						=			get_swin_config(_lowercase	)
						snake_case_ :Union[str, Any]						=			SwinForImageClassification(_lowercase	)
						model.eval()

						snake_case_ :List[str]						=			convert_state_dict(timm_model.state_dict(),					_lowercase	)
						model.load_state_dict(_lowercase	)

						snake_case_ :Tuple						=			"""http://images.cocodataset.org/val2017/000000039769.jpg"""

						snake_case_ :List[str]						=			AutoImageProcessor.from_pretrained("""microsoft/{}""".format(swin_name.replace("""_""",					"""-"""	)	)	)
						snake_case_ :str						=			Image.open(requests.get(_lowercase,					stream=_lowercase	).raw	)
						snake_case_ :Optional[int]						=			image_processor(images=_lowercase,					return_tensors="""pt"""	)

						snake_case_ :List[Any]						=			timm_model(inputs["""pixel_values"""]	)
						snake_case_ :List[Any]						=			model(**_lowercase	).logits

						assert torch.allclose(_lowercase,					_lowercase,					atol=1e-3	)

						print(f"""Saving model {swin_name} to {pytorch_dump_folder_path}"""	)
						model.save_pretrained(_lowercase	)

						print(f"""Saving image processor to {pytorch_dump_folder_path}"""	)
						image_processor.save_pretrained(_lowercase	)


if __name__ == "__main__":
						__a      =				argparse.ArgumentParser()
						# Required parameters
						parser.add_argument(
						    "--swin_name",
						    default="swin_tiny_patch4_window7_224",
						    type=str,
						    help="Name of the Swin timm model you'd like to convert.",
						)
						parser.add_argument(
						    "--pytorch_dump_folder_path", default=None, type=str, help="Path to the output PyTorch model directory."
						)

						__a      =				parser.parse_args()
						convert_swin_checkpoint(args.swin_name, args.pytorch_dump_folder_path)


from ..utils import DummyObject, requires_backends





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Dict:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[int]:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      str:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Any:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Any:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[Any]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[Any]:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      int:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[Any]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Dict:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[Any]:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      int:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      int:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[Any]:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[str]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Dict:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      int:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Tuple:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      int:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Dict:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Tuple:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      int:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      int:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[Any]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      str:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[str]:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      int:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Dict:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[int]:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[Any]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[str]:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      int:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[int]:
							requires_backends(cls				,				["torch"]     )






def    lowerCamelCase__				(				*__lowerCAmelCase  :  Union[str, Any]    ,							**__lowerCAmelCase  :  Dict				):




			"""simple docstring"""


			requires_backends(__lowerCAmelCase    ,							["torch"]				)






def    lowerCamelCase__				(				*__lowerCAmelCase  :  Optional[int]    ,							**__lowerCAmelCase  :  int				):




			"""simple docstring"""


			requires_backends(__lowerCAmelCase    ,							["torch"]				)






def    lowerCamelCase__				(				*__lowerCAmelCase  :  List[str]    ,							**__lowerCAmelCase  :  int				):




			"""simple docstring"""


			requires_backends(__lowerCAmelCase    ,							["torch"]				)






def    lowerCamelCase__				(				*__lowerCAmelCase  :  Union[str, Any]    ,							**__lowerCAmelCase  :  Optional[Any]				):




			"""simple docstring"""


			requires_backends(__lowerCAmelCase    ,							["torch"]				)






def    lowerCamelCase__				(				*__lowerCAmelCase  :  Dict    ,							**__lowerCAmelCase  :  Any				):




			"""simple docstring"""


			requires_backends(__lowerCAmelCase    ,							["torch"]				)






def    lowerCamelCase__				(				*__lowerCAmelCase  :  Optional[int]    ,							**__lowerCAmelCase  :  Dict				):




			"""simple docstring"""


			requires_backends(__lowerCAmelCase    ,							["torch"]				)






def    lowerCamelCase__				(				*__lowerCAmelCase  :  int    ,							**__lowerCAmelCase  :  Any				):




			"""simple docstring"""


			requires_backends(__lowerCAmelCase    ,							["torch"]				)





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      int:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[str]:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[str]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Tuple:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Dict:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      int:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[str]:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Union[str, Any]:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[int]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[int]:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      int:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[Any]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Tuple:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[str]:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Union[str, Any]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[int]:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Tuple:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[Any]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Any:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[int]:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[Any]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[Any]:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      str:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[Any]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[Any]:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[Any]:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[Any]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[int]:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[Any]:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[Any]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Dict:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      int:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Any:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Dict:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Tuple:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Tuple:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[Any]:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Tuple:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[int]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Union[str, Any]:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[Any]:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[str]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[int]:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Tuple:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[str]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      int:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Any:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[int]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Dict:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[str]:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[int]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[int]:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[Any]:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Dict:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Any:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[int]:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[Any]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Union[str, Any]:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Any:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Dict:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      int:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Any:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[Any]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[Any]:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Tuple:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[Any]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Tuple:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Dict:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[Any]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      str:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[Any]:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Tuple:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Dict:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[Any]:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Tuple:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[Any]:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      int:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[Any]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      int:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Dict:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Any:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Dict:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Any:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      str:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Dict:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      int:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[Any]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[Any]:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[str]:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[Any]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Tuple:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Union[str, Any]:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Union[str, Any]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[Any]:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      int:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[Any]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[Any]:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[Any]:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Dict:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Dict:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      int:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[str]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Tuple:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Any:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[Any]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[Any]:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Dict:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[Any]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Dict:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[Any]:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[str]:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Optional[int]:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Union[str, Any]:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Tuple:
							requires_backends(cls				,				["torch"]     )





class 	_lowerCAmelCase					(	metaclass=__a       ):
				_lowercase					=['''torch''']




				def __init__(					self				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      str:
							requires_backends(self				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      Dict:
							requires_backends(cls				,				["torch"]     )




				@classmethod
				def      __a						(					cls				,				*_UpperCamelCase				,				**_UpperCamelCase     )				->      List[str]:
							requires_backends(cls				,				["torch"]     )



