summaryrefslogtreecommitdiff
path: root/augment.py
diff options
context:
space:
mode:
authorjules@lens <julescarbon@gmail.com>2018-09-13 19:03:22 +0200
committerjules@lens <julescarbon@gmail.com>2018-09-13 19:03:22 +0200
commitb1d5d82fb88fd4157d3c47a9de86583d8770877f (patch)
tree1e48d9c874b693fba91cbd04187d22c7e568a42a /augment.py
parent908e0644bacad5850798c52c1c050f5f733040a2 (diff)
isdigit
Diffstat (limited to 'augment.py')
-rwxr-xr-xaugment.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/augment.py b/augment.py
index 4aab5f1..87d5717 100755
--- a/augment.py
+++ b/augment.py
@@ -80,7 +80,11 @@ if opt.which_epoch == 'latest':
else:
current_epoch = opt.which_epoch
-epoch_id = "{:02d}_{:04d}_{:04d}".format(current_epoch, data_opt.augment_take, data_opt.augment_make)
+if str(current_epoch).isdigit():
+ epoch_id = "{:02d}_{:04d}_{:04d}".format(int(current_epoch), data_opt.augment_take, data_opt.augment_make)
+else:
+ epoch_id = "{}_{:04d}_{:04d}".format(current_epoch, data_opt.augment_take, data_opt.augment_make)
+
opt.render_dir = os.path.join(opt.results_dir, opt.name, epoch_id)
if not opt.engine and not opt.onnx: