parser=argparse.ArgumentParser(description="Plot embeddings predicted by the contrastive learning pretrained model with UMAP.")
# parser.add_argument("--config", "-c", help="Filepath to the TOML config file to load.", required=True)
parser.add_argument("--input","-i",help="Path to input file containing the content to plot.",required=True)
parser.add_argument("--output","-o",help="Path to output file to write the resulting image to.",required=True)
returnparser
defrun(args):
# Note that we do NOT check to see if the checkpoint file exists, because Tensorflow/Keras requires that we pass the stem instead of the actual index file..... :-/
ifnotos.path.exists(args.input):
raiseException(f"Error: The specified input filepath ('{args.input}) does not exist.")
filepath_input=args.input
stem,ext=os.path.splitext(args.output)
filepath_output_rainfall=f"{stem}-rainfall.{ext}"
filepath_output_water=f"{stem}-water.{ext}"
sys.stderr.write(f"\n\n>>> This is TensorFlow {tf.__version__}\n\n\n")