From 2d4bd54d07da1ba0af9b5dcb069fb94b7b4bbef9 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Mon, 29 Apr 2019 11:42:32 +0200 Subject: [PATCH] Create output path if it does not exist Signed-off-by: Jim Martens --- src/twomartens/masterthesis/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/twomartens/masterthesis/main.py b/src/twomartens/masterthesis/main.py index 85c5277..dc24bcd 100644 --- a/src/twomartens/masterthesis/main.py +++ b/src/twomartens/masterthesis/main.py @@ -165,6 +165,7 @@ def _val(args: argparse.Namespace) -> None: def _ssd_val(args: argparse.Namespace) -> None: import pickle + import os import tensorflow as tf from tensorflow.python.ops import summary_ops_v2 @@ -178,6 +179,7 @@ def _ssd_val(args: argparse.Namespace) -> None: use_dropout = False weights_file = f"{args.weights_path}/VGG_coco_SSD_300x300_iter_400000.h5" output_path = f"{args.output_path}/val/ssd/{args.iteration}/" + os.makedirs(output_path, exist_ok=True) # load prepared ground truth with open(f"{args.ground_truth_path}/photo_paths.bin", "rb") as file: