diff options
| author | jules@lens <julescarbon@gmail.com> | 2018-09-13 19:03:22 +0200 |
|---|---|---|
| committer | jules@lens <julescarbon@gmail.com> | 2018-09-13 19:03:22 +0200 |
| commit | b1d5d82fb88fd4157d3c47a9de86583d8770877f (patch) | |
| tree | 1e48d9c874b693fba91cbd04187d22c7e568a42a | |
| parent | 908e0644bacad5850798c52c1c050f5f733040a2 (diff) | |
isdigit
| -rwxr-xr-x | augment.py | 6 | ||||
| -rwxr-xr-x | build_dataset.pl | 2 |
2 files changed, 6 insertions, 2 deletions
@@ -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: diff --git a/build_dataset.pl b/build_dataset.pl index f88b818..9d77766 100755 --- a/build_dataset.pl +++ b/build_dataset.pl @@ -39,7 +39,7 @@ my $dir; my $src; my $dst; for ($i = 0; $i < $count; $i++) { - if (($i % $test_split) = ($test_split-1)) { + if (($i % $test_split) == ($test_split-1)) { $dir = $thumbs_dir . "test_"; $src = $images_dir . $images[$i]; |
