コード例 #1
0
ファイル: globalresources.py プロジェクト: Macbull/deepViz
def get_models():
    global _models
    if _models is None:
        model_path = app.config["TRAINED_MODEL_PATH"]
        checkpoints = sorted(os.listdir(model_path))
        _models = [load_from_convnet(os.path.join(model_path, c)) for c in checkpoints]
    return _models
コード例 #2
0
def get_models():
    global _models
    if _models is None:
        model_path = app.config["TRAINED_MODEL_PATH"]
        checkpoints = sorted(os.listdir(model_path))
        _models = [
            load_from_convnet(os.path.join(model_path, c)) for c in checkpoints
        ]
    return _models
コード例 #3
0
def _process_model(x):
    # Import is here so that we don't need to have the convnet scripts
    # on PYTHONPATH in order to interact with already-built databases.
    from deepviz_webui.utils.decaf import load_from_convnet
    (timestep, model_filename) = x
    (directory, image_data, image_classes, num_classes) = _shared_data
    _log.info("Processing model for timestep %i" % timestep)
    model = load_from_convnet(model_filename)
    stats = ModelStats.create(model, image_data, image_classes, num_classes)
    stats.save(os.path.join(directory, str(timestep)))
コード例 #4
0
ファイル: model_stats_db.py プロジェクト: Macbull/deepViz
def _process_model(x):
    # Import is here so that we don't need to have the convnet scripts
    # on PYTHONPATH in order to interact with already-built databases.
    from deepviz_webui.utils.decaf import load_from_convnet
    (timestep, model_filename) = x
    (directory, image_data, image_classes, num_classes) = _shared_data
    _log.info("Processing model for timestep %i" % timestep)
    model = load_from_convnet(model_filename)
    stats = ModelStats.create(model, image_data, image_classes, num_classes)
    stats.save(os.path.join(directory, str(timestep)))