def handle_inputs():
    # Set indicator-dictionary for correctly retrieving / checking input options
    kwargs = {
        'single_task': False,
        'only_MNIST': True,
        'generative': True,
        'compare_code': 'all'
    }
    # Define input options
    parser = options.define_args(
        filename="_compare_MNIST",
        description=
        'Compare performance of various continual learning strategies on different'
        ' scenarios of splitMNIST.')
    parser = options.add_general_options(parser, **kwargs)
    parser = options.add_eval_options(parser, **kwargs)
    parser = options.add_task_options(parser, **kwargs)
    parser = options.add_model_options(parser, **kwargs)
    parser = options.add_train_options(parser, **kwargs)
    parser = options.add_replay_options(parser, **kwargs)
    parser = options.add_allocation_options(parser, **kwargs)
    # Parse and process (i.e., set defaults for unselected options) options
    args = parser.parse_args()
    options.set_defaults(args, **kwargs)
    return args
Exemplo n.º 2
0
def handle_inputs():
    # Set indicator-dictionary for correctly retrieving / checking input options
    kwargs = {
        'single_task': False,
        'only_MNIST': False,
        'generative': True,
        'compare_code': 'none'
    }
    # Define input options
    parser = options.define_args(
        filename="main_cl",
        description='Compare & combine continual learning approaches.')
    parser = options.add_general_options(parser, **kwargs)
    parser = options.add_eval_options(parser, **kwargs)
    parser = options.add_task_options(parser, **kwargs)
    parser = options.add_model_options(parser, **kwargs)
    parser = options.add_train_options(parser, **kwargs)
    parser = options.add_replay_options(parser, **kwargs)
    parser = options.add_bir_options(parser, **kwargs)
    parser = options.add_allocation_options(parser, **kwargs)
    # Parse, process (i.e., set defaults for unselected options) and check chosen options
    args = parser.parse_args()
    options.set_defaults(args, **kwargs)
    options.check_for_errors(args, **kwargs)
    return args
def handle_inputs():
    # Set indicator-dictionary for correctly retrieving / checking input options
    kwargs = {
        'single_task': False,
        'only_MNIST': True,
        'generative': True,
        'compare_code': 'all'
    }
    # Define input options
    parser = options.define_args(
        filename="_compare_permMNIST100",
        description=
        'Compare performance of "continual learning strategies" on long instance '
        'of standard version (i.e., Domain-IL) of permMNIST (100 tasks).')
    parser = options.add_general_options(parser, **kwargs)
    parser = options.add_eval_options(parser, **kwargs)
    parser = options.add_permutedMNIST_task_options(parser, **kwargs)
    parser = options.add_model_options(parser, **kwargs)
    parser = options.add_train_options(parser, **kwargs)
    parser = options.add_replay_options(parser, **kwargs)
    parser = options.add_bir_options(parser, **kwargs)
    parser = options.add_allocation_options(parser, **kwargs)
    # Parse and process (i.e., set defaults for unselected options) options
    args = parser.parse_args()
    args.scenario = "domain"
    args.experiment = "permMNIST"
    options.set_defaults(args, **kwargs)
    return args
def handle_inputs():
    # Set indicator-dictionary for correctly retrieving / checking input options
    kwargs = {
        'single_task': False,
        'only_MNIST': True,
        'generative': False,
        'compare_code': 'hyper'
    }
    # Define input options
    parser = options.define_args(
        filename="_compare_MNIST_hyperParams",
        description=
        'Compare hyperparameters of EWC, online EWC, SI and XdG on different '
        '"scenarios" of splitMNIST.')
    parser = options.add_general_options(parser, **kwargs)
    parser = options.add_eval_options(parser, **kwargs)
    parser = options.add_task_options(parser, **kwargs)
    parser = options.add_model_options(parser, **kwargs)
    parser = options.add_train_options(parser, **kwargs)
    parser = options.add_allocation_options(parser, **kwargs)
    parser.add_argument('--no-online',
                        action='store_true',
                        help="don't do online EWC")
    # Parse and process (i.e., set defaults for unselected options) options
    args = parser.parse_args()
    options.set_defaults(args, **kwargs)
    return args
def handle_inputs():
    # Set indicator-dictionary for correctly retrieving / checking input options
    kwargs = {
        'single_task': False,
        'only_MNIST': False,
        'generative': True,
        'compare_code': 'hyper'
    }
    # Define input options
    parser = options.define_args(
        filename="_compare_CIFAR100_hyperParams",
        description='Compare hyperparameters fo split CIFAR-100.')
    parser = options.add_general_options(parser, **kwargs)
    parser = options.add_eval_options(parser, **kwargs)
    parser = options.add_task_options(parser, **kwargs)
    parser = options.add_model_options(parser, **kwargs)
    parser = options.add_train_options(parser, **kwargs)
    parser = options.add_allocation_options(parser, **kwargs)
    parser = options.add_replay_options(parser, **kwargs)
    parser = options.add_bir_options(parser, **kwargs)
    parser.add_argument(
        '--per-bir-comp',
        action='store_true',
        help="also do gridsearch for individual BI-R components")
    # Parse and process (i.e., set defaults for unselected options) options
    args = parser.parse_args()
    options.set_defaults(args, **kwargs)
    return args
def handle_inputs():
    # Set indicator-dictionary for correctly retrieving / checking input options
    kwargs = {'single_task': False, 'only_MNIST': False}
    # Define input options
    parser = options.define_args(
        filename="compare_both",
        description='Compare CL approaches in terms of transfer efficiency.')
    parser = options.add_general_options(parser, **kwargs)
    parser = options.add_eval_options(parser, **kwargs)
    parser = options.add_task_options(parser, **kwargs)
    parser = options.add_model_options(parser, **kwargs)
    parser = options.add_train_options(parser, **kwargs)
    parser = options.add_replay_options(parser, **kwargs)
    parser = options.add_allocation_options(parser, **kwargs)
    # Parse, process (i.e., set defaults for unselected options) and check chosen options
    parser.add_argument('--n-seeds', type=int, default=1)
    parser.add_argument('--o-lambda',
                        metavar="LAMBDA",
                        type=float,
                        help="--> Online EWC: regularisation strength")
    parser.add_argument('--c-500',
                        metavar="C",
                        type=float,
                        help="--> SI: reg strength with 500 training samples")
    parser.add_argument('--lambda-500',
                        metavar="LAMBDA",
                        type=float,
                        help="--> EWC: reg strength with 500 training samples")
    parser.add_argument(
        '--o-lambda-500',
        metavar="LAMBDA",
        type=float,
        help="--> Online EWC: reg strength with 500 training samples")
    parser.add_argument(
        '--shift',
        metavar="LAMBDA",
        type=int,
        help="-->shift: The number of shift to perform on test-train set")
    parser.add_argument(
        '--slot',
        metavar="LAMBDA",
        type=int,
        help="--> slot: The number of slot to perform the training")

    args = parser.parse_args()
    options.set_defaults(args, **kwargs)
    options.check_for_errors(args, **kwargs)
    return args
Exemplo n.º 7
0
def handle_inputs():
    # Set indicator-dictionary for correctly retrieving / checking input options
    kwargs = {'single_task': False, 'only_MNIST': True, 'generative': True, 'compare_code': 'replay'}
    # Define input options
    parser = options.define_args(filename="_compare_MNIST_replay",
                                 description="Generative replay: effect of quantity & quality.")
    parser = options.add_general_options(parser, **kwargs)
    parser = options.add_eval_options(parser, **kwargs)
    parser = options.add_task_options(parser, **kwargs)
    parser = options.add_model_options(parser, **kwargs)
    parser = options.add_train_options(parser, **kwargs)
    parser = options.add_replay_options(parser, **kwargs)
    parser = options.add_allocation_options(parser, **kwargs)
    # Parse and process (i.e., set defaults for unselected options) options
    args = parser.parse_args()
    options.set_defaults(args, **kwargs)
    return args
def handle_inputs():
    # Set indicator-dictionary for correctly retrieving / checking input options
    kwargs = {'single_task': False, 'only_MNIST': False}
    # Define input options
    parser = options.define_args(
        filename="main_cl",
        description='Select hyperparameters for EWC, online EWC and SI.')
    parser = options.add_general_options(parser, **kwargs)
    parser = options.add_eval_options(parser, **kwargs)
    parser = options.add_task_options(parser, **kwargs)
    parser = options.add_model_options(parser, **kwargs)
    parser = options.add_train_options(parser, **kwargs)
    parser = options.add_replay_options(parser, **kwargs)
    parser = options.add_allocation_options(parser, **kwargs)
    # Parse, process (i.e., set defaults for unselected options) and check chosen options
    args = parser.parse_args()
    options.set_defaults(args, **kwargs)
    options.check_for_errors(args, **kwargs)
    return args
def handle_inputs():
    # Set indicator-dictionary for correctly retrieving / checking input options
    kwargs = {'single_task': False, 'only_MNIST': False}
    # Define input options
    parser = options.define_args(
        filename="main_cl",
        description='Compare & combine continual learning approaches.')
    parser = options.add_general_options(parser, **kwargs)
    parser = options.add_eval_options(parser, **kwargs)
    parser = options.add_task_options(parser, **kwargs)
    parser = options.add_model_options(parser, **kwargs)
    parser = options.add_train_options(parser, **kwargs)
    parser = options.add_replay_options(parser, **kwargs)
    parser = options.add_allocation_options(parser, **kwargs)
    # Parse, process (i.e., set defaults for unselected options) and check chosen options
    parser.add_argument('--n-seeds', type=int, default=1)
    parser.add_argument('--o-lambda',
                        type=float,
                        help="--> Online EWC: regularisation strength")
    args = parser.parse_args()
    options.set_defaults(args, **kwargs)
    options.check_for_errors(args, **kwargs)
    return args