Пример #1
0
    if args.single_process is not None:

        if args.exp is None:
            raise ValueError(
                " You should set the exp alias when using single process")

        create_exp_path(args.folder, args.exp)

        if args.single_process == 'train':
            # TODO make without position, increases the legibility.
            execute_train("0", args.folder, args.exp, False)

        elif args.single_process == 'validation':
            if len(args.validation_datasets) == 1:
                execute_validation("0", args.folder, args.exp,
                                   args.validation_datasets[0], args.model,
                                   False)
            else:
                execute_validation("0", args.folder, args.exp,
                                   args.validation_datasets, args.model, False)

        elif args.single_process == 'drive':

            driving_environments = fix_driving_environments(
                list(args.driving_environments))
            execute_drive("0",
                          args.folder,
                          args.exp,
                          driving_environments[0],
                          False,
                          no_screen=args.no_screen)
Пример #2
0
                "9", "eccv",
                "all_da_shared_E1E12_l1_25_new_nopretrained_highadv")

            # trainnewGAN_task.execute("6", "eccv", "exp_pretrained_F_IL")
            # train_da.execute("8", "eccv", "all_da_v2")
            # train_da_shared.execute("1", "eccv", "all_da_shared_E1E12_l1_10")
            # train_da_shared.execute("9", "eccv", "all_da_shared_E1E12_l1_25_aug")
            # train_da_shared.execute("3", "eccv", "all_da_shared_E1E12_l1_25_new_nopretrained")
            # train_wdgrl_withoutgen.execute("0", "eccv", "exp_wdgrl_better")
            # train_da_no5.execute("8", "eccv", "all_da_aug_no5_E1E12")
            # testGAN.execute("7", "eccv", "all_da_orig")
            # trainnewGAN.execute("4", "eccv", "exp_reconstruct")
            # trainnewGAN.execute("4", "eccv", "experiment_1")

        if args.single_process == 'validation':
            execute_validation("0", "eccv", "experiment_1", "SeqVal")

        if args.single_process == 'drive':
            execute_drive("0", "eccv", "experiment_1", 'Town02')

    else:

        # TODO: of course this change from gpu to gpu , but for now we just assume at least a K40

        # Maybe the latest voltas will be underused
        # OBS: This usage is also based on my tensorflow experiences, maybe pytorch allows more.
        allocation_parameters = {
            'gpu_value': 3.5,
            'train_cost': 2,
            'validation_cost': 1.5,
            'drive_cost': 1.5
Пример #3
0
from coil_core import execute_validation

if __name__ == '__main__':
    folder = 'cvpr'
    exp = 'img_gtseg_camv_control'
    dataset = 'CoILVal1'

    execute_validation('0', folder, exp, dataset)
    print("SUCCESSFULLY RAN VALIDATION")
Пример #4
0
            raise ValueError(
                " You should set the exp alias when using single process")

        create_exp_path(args.folder, args.exp)

        if args.single_process == 'train':
            execute_train(gpu="0",
                          exp_batch=args.folder,
                          exp_alias=args.exp,
                          suppress_output=False,
                          number_of_workers=args.number_of_workers)

        elif args.single_process == 'validation':
            execute_validation(gpu="0",
                               exp_batch=args.folder,
                               exp_alias=args.exp,
                               dataset=args.validation_datasets[0],
                               suppress_output=False)

        elif args.single_process == 'drive':
            drive_params['suppress_output'] = False
            execute_drive("0", args.folder, args.exp,
                          list(args.driving_environments)[0], drive_params)

        else:
            raise Exception(
                "Invalid name for single process, chose from (train, validation, test)"
            )

    else:
        ####
Пример #5
0
                print(args.encoder_folder, args.encoder_exp,
                      args.encoder_checkpoint)
                raise ValueError(
                    "You should set all three arugments for using encoder: --encoder-folder, --encoder-exp and --encoder-checkpoint"
                )

            if args.single_process == 'train':
                execute_train(gpu=args.gpus[0],
                              exp_batch=args.folder,
                              exp_alias=args.exp,
                              suppress_output=False,
                              encoder_params=encoder_params)
            elif args.single_process == 'validation':
                execute_validation(gpu=args.gpus[0],
                                   exp_batch=args.folder,
                                   exp_alias=args.exp,
                                   json_file_path=args.val_json,
                                   suppress_output=False,
                                   encoder_params=encoder_params)

        # train_encoder and validation_encoder are for training the encoder model only.
        elif args.single_process == 'train_encoder':
            # Check if the mandatory folder argument is passed
            if args.encoder_folder is None:
                raise ValueError(
                    "You should set a folder name where the experiments are placed"
                )
            # This is the folder creation of the logs
            create_log_folder(args.encoder_folder)
            if args.encoder_exp is None:
                raise ValueError("You should set the exp alias")
            execute_train_encoder(gpu=args.gpus[0],