from pathlib import Path from utils_model import get_predictions # Run the ResNet on the generated patches. print("\n\n+++++ Running 4_test.py +++++") print("\n----- Finding validation patch predictions -----") # Validation patches. get_predictions(patches_eval_folder=Path( "/home/ifsdata/vlg/jason/easy-self-supervised-training/data/voc_trainval_full/val" ), output_folder=Path("outputs").joinpath( "resnet18_e5_va0.48108"), auto_select=False, batch_size=config.args.batch_size, checkpoints_folder=config.args.checkpoints_folder, classes=config.classes, device=config.device, eval_model=Path("checkpoints/resnet18_e5_va0.48108.pt"), num_classes=config.num_classes, num_layers=config.args.num_layers, num_workers=config.args.num_workers, path_mean=config.path_mean, path_std=config.path_std, pretrain=config.args.pretrain) get_predictions(patches_eval_folder=Path( "/home/ifsdata/vlg/jason/easy-self-supervised-training/data/voc_trainval_full/val" ), output_folder=Path("outputs").joinpath( "resnet18_e10_va0.55588"), auto_select=False,
# DeepSlide # Jason Wei, Behnaz Abdollahi, Saeed Hassanpour # Run the resnet on generated patches. from utils_model import get_predictions, get_predictions # validation patches get_predictions(patches_eval_folder=config.patches_eval_val, auto_select=config.auto_select, eval_model=config.eval_model, checkpoints_folder=config.checkpoints_folder, output_folder=config.preds_val) # test patches get_predictions(patches_eval_folder=config.patches_eval_test, auto_select=config.auto_select, eval_model=config.eval_model, checkpoints_folder=config.checkpoints_folder, output_folder=config.preds_test)
import config from pathlib import Path from utils_model import get_predictions # Run the ResNet on the generated patches. print("\n\n+++++ Running 4_test.py +++++") print("\n----- Finding validation patch predictions -----") # Validation patches. get_predictions( patches_eval_folder=Path( "/home/brenta/scratch/data/imagenet_rotnet/train"), #patches_eval_folder=Path("/home/ifsdata/vlg/jason/easy-self-supervised-training/data/voc_trainval_full/train"), output_folder=Path("/home/brenta/scratch/jason/outputs/image_net/vanilla/" ).joinpath("resnet18_e0_mb40000_va0.80428.pt"), auto_select=False, batch_size=config.args.batch_size, checkpoints_folder=config.args.checkpoints_folder, classes=config.classes, device=config.device, eval_model=Path( "/home/brenta/scratch/jason/checkpoints/image_net/vanilla/exp_10/resnet18_e0_mb40000_va0.80428.pt" ), num_classes=config.num_classes, num_layers=config.args.num_layers, num_workers=config.args.num_workers, path_mean=config.path_mean, path_std=config.path_std, pretrain=config.args.pretrain) print("----- Finished finding validation patch predictions -----\n")
num_epochs=config.args.num_epochs, train_folder=config.args.train_folder, weight_decay=config.args.weight_decay) print("+++++ Finished running 3_train.py +++++\n\n") # Run the ResNet on the generated patches. print("\n\n+++++ Running 4_test.py +++++") print("\n----- Finding validation patch predictions -----") # Validation patches. get_predictions(patches_eval_folder=config.args.patches_eval_val, output_folder=config.args.preds_val, auto_select=config.args.auto_select, batch_size=config.args.batch_size, checkpoints_folder=config.args.checkpoints_folder, classes=config.classes, device=config.device, eval_model=config.eval_model, num_classes=config.num_classes, num_layers=config.args.num_layers, num_workers=config.args.num_workers, path_mean=config.path_mean, path_std=config.path_std, pretrain=config.args.pretrain) print("----- Finished finding validation patch predictions -----\n") print("----- Finding test patch predictions -----") # Test patches. get_predictions(patches_eval_folder=config.args.patches_eval_test, output_folder=config.args.preds_test, auto_select=config.args.auto_select, batch_size=config.args.batch_size, checkpoints_folder=config.args.checkpoints_folder, classes=config.classes,