Example #1
0
def run(blueoil_config_file, experiment_id):
    """Train from blueoil config.

    Args:
        blueoil_config_file: 
        experiment_id: 

    """

    if horovod_util.is_enabled():
        horovod_util.setup()

    if horovod_util.is_rank0():
        # Copy bueoil config yaml.
        output_dir = os.environ.get('OUTPUT_DIR', 'saved')
        experiment_dir = os.path.join(output_dir, experiment_id)
        save_config_file(blueoil_config_file, experiment_dir)

    # Generete lmnet config from blueoil config.
    # this lmnet_config_file cannot be reuse from multiprocesses as the file is a named temporary file.
    lmnet_config_file = generate(blueoil_config_file)

    # Start training
    run_train(network=None,
              dataset=None,
              config_file=lmnet_config_file,
              experiment_id=experiment_id,
              recreate=False)
Example #2
0
def save_config(blueoil_config, output=None):
    if not output:
        output = blueoil_config['model_name'] + ".py"

    tmpfile = generate(blueoil_config)
    shutil.copy(tmpfile, output)

    return output
Example #3
0
def run(blueoil_config_file, experiment_id):
    """Train from blueoil config."""

    # Generete lmnet config from blueoil config.
    lmnet_config_file = generate(blueoil_config_file)

    # Start training
    run_train(network=None,
              dataset=None,
              config_file=lmnet_config_file,
              experiment_id=experiment_id,
              recreate=False)
Example #4
0
def run(blueoil_config_file, experiment_id):
    """Train from blueoil config."""

    # Copy bueoil config yaml.
    output_dir = os.environ.get('OUTPUT_DIR', 'saved')
    experiment_dir = os.path.join(output_dir, experiment_id)
    save_config_file(blueoil_config_file, experiment_dir)

    # Generete lmnet config from blueoil config.
    lmnet_config_file = generate(blueoil_config_file)

    # Start training
    run_train(network=None, dataset=None, config_file=lmnet_config_file, experiment_id=experiment_id, recreate=False)
Example #5
0
def test_semantic_segmentation(init_env, config):
    """Run Blueoil test of semantic segmentation"""
    config_file = generate(config)
    run_all_steps(init_env, config_file)
Example #6
0
def test_classification(init_env, config):
    """Run Blueoil test of classification"""
    config_file = generate(config)
    run_all_steps(init_env, config_file)
Example #7
0
def test_object_detection(init_env, config):
    """Run Blueoil test of object detection"""
    config_file = generate(config)
    run_all_steps(init_env, config_file)