예제 #1
0
파일: evaluate.py 프로젝트: ki-lm/blueoil
def main(network, dataset, config_file, experiment_id, restore_path):
    environment.init(experiment_id)

    config = config_util.load_from_experiment()

    if config_file:
        config = config_util.merge(config, config_util.load(config_file))

    if network:
        network_class = module_loader.load_network_class(network)
        config.NETWORK_CLASS = network_class
    if dataset:
        dataset_class = module_loader.load_dataset_class(dataset)
        config.DATASET_CLASS = dataset_class

    executor.init_logging(config)
    config_util.display(config)

    evaluate(config, restore_path)
예제 #2
0
def run(network, dataset, config_file, experiment_id, recreate):
    environment.init(experiment_id)

    config = config_util.load(config_file)

    if network:
        network_class = module_loader.load_network_class(network)
        config.NETWORK_CLASS = network_class
    if dataset:
        dataset_class = module_loader.load_dataset_class(dataset)
        config.DATASET_CLASS = dataset_class

    config_util.display(config)
    executor.init_logging(config)

    executor.prepare_dirs(recreate)
    config_util.copy_to_experiment_dir(config_file)
    config_util.save_yaml(environment.EXPERIMENT_DIR, config)

    start_training(config)