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
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
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)))