from ..utils import DummyObject, requires_backends







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Tuple 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				List[Any]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Any 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Any:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : int 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				List[Any]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Any 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				List[str]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : str 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				str:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Any 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Dict:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Dict 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Optional[int]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Optional[Any] 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Any:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Optional[int] 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				List[str]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Dict 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				str:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Dict 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				int:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Optional[Any] 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				str:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Union[str, Any] 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				List[str]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : str 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Optional[Any]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Any 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Tuple:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : List[Any] 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				str:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Dict 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Any:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Union[str, Any] 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				int:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : int 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Optional[int]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Tuple 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Tuple:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Optional[Any] 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Optional[Any]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Dict 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				List[str]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : List[str] 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				List[Any]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Dict 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				str:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : int 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				List[str]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Optional[int] 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Any:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Union[str, Any] 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Tuple:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Optional[int] 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Union[str, Any]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : str 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Optional[Any]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Any 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				List[Any]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : int 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Tuple:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : List[Any] 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				str:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : List[str] 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Tuple:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : str 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Optional[int]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Tuple 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				int:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : List[str] 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				List[str]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : List[Any] 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				str:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Union[str, Any] 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				List[Any]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Tuple 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Tuple:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Tuple 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				List[str]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Optional[Any] 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				List[Any]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Dict 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Optional[int]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : str 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				List[Any]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Optional[int] 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Tuple:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Union[str, Any] 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Any:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Tuple 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Union[str, Any]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : int 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Dict:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Optional[Any] 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Any:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : str 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				List[str]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : List[str] 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				str:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Optional[Any] 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Tuple:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Any 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				str:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Any 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Dict:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Tuple 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				str:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : List[Any] 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Optional[Any]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Dict 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				List[str]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Dict 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Dict:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : int 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Optional[int]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Any 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				str:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Optional[int] 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Optional[int]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : int 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				int:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Union[str, Any] 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				str:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : int 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Union[str, Any]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Optional[Any] 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Dict:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : int 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				str:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Tuple 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				int:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Tuple 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Tuple:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : int 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				int:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : List[Any] 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Dict:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Dict 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Tuple:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Any 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				List[str]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : List[str] 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				List[str]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Optional[Any] 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Optional[Any]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )







class       __snake_case (  metaclass=snake_case__ ):
 __lowerCamelCase     : Optional[int] 	=   ['vision']
 def __init__(	self		, *snake_case__		, **snake_case__    )						->				Union[str, Any]:
       '''simple docstring'''





       requires_backends(self		, ['''vision''']    )




import argparse

from transformers import CanineConfig, CanineModel, CanineTokenizer, load_tf_weights_in_canine
from transformers.utils import logging


logging.set_verbosity_info()
def   snake_case_    (			__lowercase      ,							__lowercase							):
   # Initialize PyTorch model
   UpperCAmelCase_				:   Optional[Any]							= CanineConfig()
   UpperCAmelCase_				:   Any							= CanineModel(__lowercase							)
   model.eval()

   print(F'''Building PyTorch model from configuration: {config}'''							)

   # Load weights from tf checkpoint
   load_tf_weights_in_canine(__lowercase      ,							__lowercase      ,							__lowercase							)

   # Save pytorch-model (weights and configuration)
   print(F'''Save PyTorch model to {pytorch_dump_path}'''							)
   model.save_pretrained(__lowercase							)

   # Save tokenizer files
   UpperCAmelCase_				:   List[Any]							= CanineTokenizer()
   print(F'''Save tokenizer files to {pytorch_dump_path}'''							)
   tokenizer.save_pretrained(__lowercase							)


if __name__ == "__main__":
       __UpperCamelCase					:	int          =				argparse.ArgumentParser()
       # Required parameters
       parser.add_argument(
           '--tf_checkpoint_path',
           default=None,
           type=str,
           required=True,
           help='Path to the TensorFlow checkpoint. Should end with model.ckpt',
       )
       parser.add_argument(
           '--pytorch_dump_path',
           default=None,
           type=str,
           required=True,
           help='Path to a folder where the PyTorch model will be placed.',
       )
       __UpperCamelCase					:	str          =				parser.parse_args()
       convert_tf_checkpoint_to_pytorch(args.tf_checkpoint_path, args.pytorch_dump_path)