From 59d6bd3f8d3f7577beecdf71c39903b305914b41 Mon Sep 17 00:00:00 2001 From: Felix Wu Date: Tue, 4 Apr 2017 00:57:57 -0400 Subject: [PATCH] move existing exp folder to /tmp --- main.py | 7 +++++-- scripts/cifar10.sh | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 60bec53..79a256b 100644 --- a/main.py +++ b/main.py @@ -219,8 +219,11 @@ def main(): ans = input('Do you want to overwrite it? [y/N]:') if ans not in ('y', 'Y', 'yes', 'Yes'): os.exit(1) - print('remove existing ' + args.save) - shutil.rmtree(args.save) + tmp_path = '/tmp/{}_{}'.format(os.path.basename(args.save), + time.time()) + print('move existing {} to {}'.format(args.save, Fore.RED + + tmp_path + Fore.RESET)) + shutil.move(args.save, tmp_path) os.makedirs(args.save) print('create folder: ' + Fore.GREEN + args.save + Fore.RESET) diff --git a/scripts/cifar10.sh b/scripts/cifar10.sh index 2c74af5..d5f4c35 100755 --- a/scripts/cifar10.sh +++ b/scripts/cifar10.sh @@ -7,7 +7,9 @@ # python3 main.py --arch resnet --depth 110 --save save/cifar10+-resnet-110 --data cifar10+ --epochs 164 # ResNet with Stochastic Depth -python3 main.py --arch resnet --depth 110 --save save/cifar10+-resnet-stoch-110 --data cifar10+ --epochs 164 --death-mode linear --death-rate 0.5 +# python3 main.py --arch resnet --depth 56 --save save/cifar10+-resnet-stoch-56 --data cifar10+ --epochs 164 --death-mode linear --death-rate 0.5 +# python3 main.py --arch resnet --depth 110 --save save/cifar10+-resnet-stoch-110 --data cifar10+ --epochs 164 --death-mode linear --death-rate 0.5 +python3 main.py --arch resnet --depth 110 --save save/cifar10+-resnet-stoch-110-e500 --data cifar10+ --epochs 500 --batch-size 128 --death-mode linear --death-rate 0.5 # DenseNet