PNG: create output dir if doesn't exist

This commit is contained in:
Starbeamrainbowlabs 2022-10-21 15:17:39 +01:00
parent 3f7db6fa78
commit 81e53efd9c
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -88,6 +88,9 @@ def run(args):
sys.stderr.write(">>> Complete\n") sys.stderr.write(">>> Complete\n")
def do_png(args, ai, dataset, model_code): def do_png(args, ai, dataset, model_code):
if not os.path.exists(args.output):
os.mkdir(os.path.dirname(args.output))
model_params = json.loads(readfile(args.params)) model_params = json.loads(readfile(args.params))
i = 0 i = 0