parser.add_argument("--mode", choices=["train", "test"], default="train")
parser.add_argument("--num-epochs", type=int, default=50, help="Number of training epochs")
parser.add_argument("--gpus", type=int, default=1)
parser.add_argument("--exp-dir", type=pathlib.Path, default="experiments",
help="Path where model and results should be saved")
parser.add_argument("--exp", type=str, help="Name of the experiment")
parser.add_argument("--checkpoint", type=pathlib.Path,
help="Path to pre-trained model. Use with --mode test")
parser.add_argument("--resume", action="store_true",