diff --git a/README.md b/README.md index 1f3f2a9..4c0d7e2 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ conda install pytorch torchvision cuda100 -c pytorch Searching CNNs ``` bash ./scripts-cnn/search.sh 1 base cifar10 +bash ./scripts-cnn/DMS-V-TrainV3.sh 1 bash ./scripts-cnn/search-acc-v2.sh 3 acc2 ``` diff --git a/exps-cnn/GDAS-Search.py b/exps-cnn/GDAS-Search.py index 97efb33..3df324a 100644 --- a/exps-cnn/GDAS-Search.py +++ b/exps-cnn/GDAS-Search.py @@ -219,8 +219,8 @@ def main(): print_log('Finish with training time = {:}'.format( convert_secs2time(total_train_time, True) ), log) # clear GPU cache - torch.cuda.empty_cache() - main_procedure(config, args.dataset, args.data_path, args, basemodel.genotype(), 36, 20, log) + #torch.cuda.empty_cache() + #main_procedure(config, args.dataset, args.data_path, args, basemodel.genotype(), 36, 20, log) log.close() diff --git a/TEMP/DMS-V-TrainV3.sh b/scripts-cnn/DMS-V-TrainV3.sh similarity index 72% rename from TEMP/DMS-V-TrainV3.sh rename to scripts-cnn/DMS-V-TrainV3.sh index 5107c10..1fe6ddd 100644 --- a/TEMP/DMS-V-TrainV3.sh +++ b/scripts-cnn/DMS-V-TrainV3.sh @@ -1,7 +1,8 @@ #!/usr/bin/env sh -if [ "$#" -ne 2 ] ;then +# bash scripts-cnn/DMS-V-TrainV3.sh 1 +if [ "$#" -ne 1 ] ;then echo "Input illegal number of parameters " $# - echo "Need 2 parameters for the GPUs and the epochs" + echo "Need 1 parameters for the GPUs and the epochs" exit 1 fi if [ "$TORCH_HOME" = "" ]; then @@ -15,10 +16,10 @@ gpus=$1 arch=acc2 cutout=0 dataset=cifar10 -epoch=$2 +epoch=200 SAVED=./snapshots/NAS/ACC-V3-Search-${arch}-${dataset}-cut${cutout}-${epoch}-E600 -CUDA_VISIBLE_DEVICES=${gpus} python ./exps-nas/acc_search_v3.py \ +CUDA_VISIBLE_DEVICES=${gpus} python ./exps-cnn/GDAS-Search.py \ --data_path $TORCH_HOME/cifar.python \ --arch ${arch} --dataset ${dataset} --batch_size 128 \ --save_path ${SAVED} \ @@ -26,5 +27,5 @@ CUDA_VISIBLE_DEVICES=${gpus} python ./exps-nas/acc_search_v3.py \ --epochs ${epoch} --cutout ${cutout} --validate --grad_clip 5 \ --init_channels 16 --layers 8 \ --tau_max 10 --tau_min 1 \ - --model_config ./configs/nas-cifar-cos.config \ - --print_freq 100 --workers 8 + --model_config ./configs/nas-cifar-cos-cut.config \ + --print_freq 100 --workers 10 diff --git a/scripts-cnn/search-acc-v2.sh b/scripts-cnn/search-acc-v2.sh index d865f86..9438f5c 100644 --- a/scripts-cnn/search-acc-v2.sh +++ b/scripts-cnn/search-acc-v2.sh @@ -18,12 +18,12 @@ dataset=cifar10 epoch=200 SAVED=./snapshots/NAS/ACC-V2-Search-${arch}-${dataset}-cut${cutout}-${epoch}-E600 -CUDA_VISIBLE_DEVICES=${gpus} python ./exps-cnn/DARTS-Search.py \ +CUDA_VISIBLE_DEVICES=${gpus} python ./exps-cnn/GDAS-Search.py \ --data_path $TORCH_HOME/cifar.python \ --arch ${arch} --dataset ${dataset} --batch_size 128 \ --save_path ${SAVED} \ --learning_rate_max 0.025 --learning_rate_min 0.001 --momentum 0.9 --weight_decay 0.0003 \ --epochs ${epoch} --cutout ${cutout} --validate --grad_clip 5 \ --init_channels 16 --layers 8 \ - --model_config ./configs/nas-cifar-cos.config \ + --model_config ./configs/nas-cifar-cos-cut.config \ --print_freq 100 --workers 10