Create output path if it does not exist

Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
2019-04-29 11:42:32 +02:00
parent 7f84fafbb2
commit 2d4bd54d07

View File

@ -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: