(model_type, checkpoint_file, output_dir, remove_variables_regex)
Returns Checkpoint dumper instance for a given model type.

  Parameters
  ----------
  model_type : str
      Type of deeplearning framework
  checkpoint_file : str
      Path to checkpoint file
  output_dir : str
      Path to output directory
  remove_variables_regex : str
      Regex for variables to be ignored

  Returns
  -------
  (TensorflowCheckpointDumper, PytorchCheckpointDumper)
      Checkpoint Dumper Instance for corresponding model type

  Raises
  ------
  Error
      If particular model type is not supported
Returns Checkpoint dumper instance for a given model type.
Returns Checkpoint dumper instance for a given model type .
def get_checkpoint_dumper(model_type, checkpoint_file, output_dir, remove_variables_regex):
  """Returns Checkpoint dumper instance for a given model type.

  Parameters
  ----------
  model_type : str
      Type of deeplearning framework
  checkpoint_file : str
      Path to checkpoint file
  output_dir : str
      Path to output directory
  remove_variables_regex : str
      Regex for variables to be ignored

  Returns
  -------
  (TensorflowCheckpointDumper, PytorchCheckpointDumper)
      Checkpoint Dumper Instance for corresponding model type

  Raises
  ------
  Error
      If particular model type is not supported
  """
  if model_type == 'tensorflow':
    from tensorflow_checkpoint_dumper import TensorflowCheckpointDumper

    return TensorflowCheckpointDumper(
      checkpoint_file, output_dir, remove_variables_regex)
  elif model_type == 'pytorch':
    from pytorch_checkpoint_dumper import PytorchCheckpointDumper

    return PytorchCheckpointDumper(
      checkpoint_file, output_dir, remove_variables_regex)
  else:
    raise Error('Currently, "%s" models are not supported'.format(model_type))
def get_checkpoint_dumper ( model_type , checkpoint_file , output_dir , remove_variables_regex ) : if model_type == 'tensorflow' : from tensorflow_checkpoint_dumper import TensorflowCheckpointDumper return TensorflowCheckpointDumper ( checkpoint_file , output_dir , remove_variables_regex ) elif model_type == 'pytorch' : from pytorch_checkpoint_dumper import PytorchCheckpointDumper return PytorchCheckpointDumper ( checkpoint_file , output_dir , remove_variables_regex ) else : raise Error ( 'Currently, "%s" models are not supported' . format ( model_type ) )