update scripts
This commit is contained in:
		
							
								
								
									
										30
									
								
								TEMP/DMS-V-Train.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								TEMP/DMS-V-Train.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,30 @@ | ||||
| #!/usr/bin/env sh | ||||
| if [ "$#" -ne 3 ] ;then | ||||
|   echo "Input illegal number of parameters " $# | ||||
|   echo "Need 3 parameters for the GPUs and the epochs and the cutout" | ||||
|   exit 1                | ||||
| fi  | ||||
| if [ "$TORCH_HOME" = "" ]; then | ||||
|   echo "Must set TORCH_HOME envoriment variable for data dir saving" | ||||
|   exit 1 | ||||
| else | ||||
|   echo "TORCH_HOME : $TORCH_HOME" | ||||
| fi | ||||
|  | ||||
| gpus=$1 | ||||
| arch=acc2 | ||||
| cutout=$3 | ||||
| dataset=cifar10 | ||||
| epoch=$2 | ||||
| SAVED=./snapshots/NAS/ACC-V2-Search-${arch}-${dataset}-cut${cutout}-${epoch}-E600 | ||||
|  | ||||
| CUDA_VISIBLE_DEVICES=${gpus} python ./exps-nas/acc_search_v2.py \ | ||||
| 	--data_path $TORCH_HOME/cifar.python \ | ||||
| 	--arch ${arch} --dataset ${dataset} --batch_size 128 \ | ||||
| 	--save_path ${SAVED} \ | ||||
| 	--learning_rate_max 0.05 --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 \ | ||||
| 	--tau_max 10 --tau_min 4 \ | ||||
| 	--model_config ./configs/nas-cifar-cos.config \ | ||||
| 	--print_freq 100 --workers 8 | ||||
							
								
								
									
										30
									
								
								TEMP/DMS-V-TrainV3.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								TEMP/DMS-V-TrainV3.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,30 @@ | ||||
| #!/usr/bin/env sh | ||||
| if [ "$#" -ne 2 ] ;then | ||||
|   echo "Input illegal number of parameters " $# | ||||
|   echo "Need 2 parameters for the GPUs and the epochs" | ||||
|   exit 1                | ||||
| fi  | ||||
| if [ "$TORCH_HOME" = "" ]; then | ||||
|   echo "Must set TORCH_HOME envoriment variable for data dir saving" | ||||
|   exit 1 | ||||
| else | ||||
|   echo "TORCH_HOME : $TORCH_HOME" | ||||
| fi | ||||
|  | ||||
| gpus=$1 | ||||
| arch=acc2 | ||||
| cutout=0 | ||||
| dataset=cifar10 | ||||
| epoch=$2 | ||||
| SAVED=./snapshots/NAS/ACC-V3-Search-${arch}-${dataset}-cut${cutout}-${epoch}-E600 | ||||
|  | ||||
| CUDA_VISIBLE_DEVICES=${gpus} python ./exps-nas/acc_search_v3.py \ | ||||
| 	--data_path $TORCH_HOME/cifar.python \ | ||||
| 	--arch ${arch} --dataset ${dataset} --batch_size 128 \ | ||||
| 	--save_path ${SAVED} \ | ||||
| 	--learning_rate_max 0.01 --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 \ | ||||
| 	--tau_max 10 --tau_min 1 \ | ||||
| 	--model_config ./configs/nas-cifar-cos.config \ | ||||
| 	--print_freq 100 --workers 8 | ||||
							
								
								
									
										57
									
								
								TEMP/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										57
									
								
								TEMP/README.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,57 @@ | ||||
| # Neural-Architecture-Search | ||||
|  | ||||
| ### Baseline | ||||
| ``` | ||||
| bash ./scripts-nas/search.sh 1 base cifar10 | ||||
| bash ./scripts-nas/search.sh 1 share | ||||
| bash ./scripts-nas/batch-base-search.sh 1 | ||||
| bash ./scripts-nas/batch-base-model.sh 1 | ||||
| ``` | ||||
|  | ||||
| ### Meta | ||||
| ``` | ||||
| bash ./scripts-nas/meta-search.sh 0 meta 20 5 | ||||
| ``` | ||||
|  | ||||
| ### Acceleration | ||||
| ``` | ||||
| bash ./scripts-nas/search-acc-v2.sh 3 acc2 | ||||
| bash ./scripts-nas/DMS-V-Train.sh 0 | ||||
|  | ||||
| bash ./scripts-nas/search-acc-simple.sh 3 NetworkV2 | ||||
| ``` | ||||
|  | ||||
| ### Base Model Training | ||||
| ``` | ||||
| bash ./scripts-nas/train-model.sh 3 AmoebaNet | ||||
| bash ./scripts-nas/train-model.sh 3 NASNet | ||||
| bash ./scripts-nas/train-model.sh 3 DARTS_V1 | ||||
| bash ./scripts-nas/train-model-simple.sh 3 AmoebaNet | ||||
| bash ./scripts-nas/train-imagenet.sh 3 DARTS_V2 50 14 | ||||
|  | ||||
| bash scripts-nas/TRAIN-BASE.sh 0 PNASNet cifar10 nocut 48 11 | ||||
| bash scripts-nas/TRAIN-BASE.sh 0 AmoebaNet cifar10 nocut 36 20 | ||||
| bash scripts-nas/TRAIN-BASE.sh 0 NASNet cifar10 nocut 33 20 | ||||
|  | ||||
| bash scripts-nas/TRAIN-BASE.sh 0 DMS_F1 cifar10 nocut 36 20 | ||||
| bash scripts-nas/TRAIN-BASE.sh 0 DMS_V1 cifar10 nocut 36 20 | ||||
| bash scripts-nas/TRAIN-BASE.sh 0 GDAS_CC cifar10 nocut 36 20 | ||||
| bash scripts-nas/train-imagenet.sh 3 DMS_F1 52 14 | ||||
| bash scripts-nas/train-imagenet.sh 3 DMS_V1 50 14 | ||||
|  | ||||
|  | ||||
| bash scripts-nas/TRAIN-BASE.sh 0 DMS_V1 cifar10 nocut 36 20 | ||||
| ``` | ||||
|  | ||||
|  | ||||
| ### Visualization | ||||
| ``` | ||||
| python ./exps-nas/vis-arch.py --checkpoint  --save_dir | ||||
| python ./exps-nas/cvpr-vis.py --save_dir ./snapshots/NAS-VIS/ | ||||
| ``` | ||||
|  | ||||
| ### Test datasets | ||||
| ``` | ||||
| cd ./lib/datasets/ | ||||
| python test_NLP.py | ||||
| ``` | ||||
							
								
								
									
										30
									
								
								TEMP/TRAIN-BASE.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								TEMP/TRAIN-BASE.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,30 @@ | ||||
| #!/usr/bin/env sh | ||||
| # bash scripts-nas/TRAIN-BASE.sh 0 DMS_V1 cifar10 nocut init-channel layers | ||||
| if [ "$#" -ne 6 ] ;then | ||||
|   echo "Input illegal number of parameters " $# | ||||
|   echo "Need 6 parameters for the GPUs, the architecture, the dataset, the config, the initial channel, and the number of layers" | ||||
|   exit 1 | ||||
| fi  | ||||
| if [ "$TORCH_HOME" = "" ]; then | ||||
|   echo "Must set TORCH_HOME envoriment variable for data dir saving" | ||||
|   exit 1 | ||||
| else | ||||
|   echo "TORCH_HOME : $TORCH_HOME" | ||||
| fi | ||||
|  | ||||
| gpus=$1 | ||||
| arch=$2 | ||||
| dataset=$3 | ||||
| config=$4 | ||||
| C=$5 | ||||
| N=$6 | ||||
| SAVED=./snapshots/NAS/${arch}-${C}-${N}-${dataset}-${config}-E600 | ||||
|  | ||||
| CUDA_VISIBLE_DEVICES=${gpus} python ./exps-nas/train_base.py \ | ||||
| 	--data_path $TORCH_HOME/cifar.python \ | ||||
| 	--dataset ${dataset} --arch ${arch} \ | ||||
| 	--save_path ${SAVED} \ | ||||
| 	--grad_clip 5 \ | ||||
| 	--init_channels ${C} --layers ${N} \ | ||||
| 	--model_config ./configs/nas-cifar-cos-${config}.config \ | ||||
| 	--print_freq 100 --workers 8 | ||||
							
								
								
									
										23
									
								
								TEMP/batch-base-model.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								TEMP/batch-base-model.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,23 @@ | ||||
| #!/usr/bin/env sh | ||||
| set -e | ||||
| if [ "$#" -ne 1 ] ;then | ||||
|   echo "Input illegal number of parameters " $# | ||||
|   echo "Need 1 parameters for the GPUs" | ||||
|   exit 1                | ||||
| fi  | ||||
| if [ "$TORCH_HOME" = "" ]; then | ||||
|   echo "Must set TORCH_HOME envoriment variable for data dir saving" | ||||
|   exit 1 | ||||
| else | ||||
|   echo "TORCH_HOME : $TORCH_HOME" | ||||
| fi | ||||
|  | ||||
| gpus=$1 | ||||
|  | ||||
| bash ./scripts-nas/train-model.sh ${gpus} AmoebaNet 0 | ||||
|  | ||||
| bash ./scripts-nas/train-model.sh ${gpus} NASNet    0 | ||||
|  | ||||
| bash ./scripts-nas/train-model.sh ${gpus} DARTS_V1  0 | ||||
|  | ||||
| bash ./scripts-nas/train-model.sh ${gpus} DARTS_V2  0 | ||||
							
								
								
									
										19
									
								
								TEMP/batch-base-search.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								TEMP/batch-base-search.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| #!/usr/bin/env sh | ||||
| if [ "$#" -ne 1 ] ;then | ||||
|   echo "Input illegal number of parameters " $# | ||||
|   echo "Need 1 parameters for the GPUs" | ||||
|   exit 1                | ||||
| fi  | ||||
| if [ "$TORCH_HOME" = "" ]; then | ||||
|   echo "Must set TORCH_HOME envoriment variable for data dir saving" | ||||
|   exit 1 | ||||
| else | ||||
|   echo "TORCH_HOME : $TORCH_HOME" | ||||
| fi | ||||
|  | ||||
| gpus=$1 | ||||
| Times="1 2 3" | ||||
|  | ||||
| for time in ${Times}; do | ||||
|   bash ./scripts-nas/search.sh ${gpus}  | ||||
| done | ||||
							
								
								
									
										30
									
								
								TEMP/meta-search.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								TEMP/meta-search.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,30 @@ | ||||
| #!/usr/bin/env sh | ||||
| if [ "$#" -ne 4 ] ;then | ||||
|   echo "Input illegal number of parameters " $# | ||||
|   echo "Need 4 parameters for the GPUs and the network and N-way and K-shot" | ||||
|   exit 1                | ||||
| fi  | ||||
| if [ "$TORCH_HOME" = "" ]; then | ||||
|   echo "Must set TORCH_HOME envoriment variable for data dir saving" | ||||
|   exit 1 | ||||
| else | ||||
|   echo "TORCH_HOME : $TORCH_HOME" | ||||
| fi | ||||
|  | ||||
| gpus=$1 | ||||
| arch=$2 | ||||
| n_way=$3 | ||||
| k_shot=$4 | ||||
| cutout=16 | ||||
| epoch=60 | ||||
| SAVED=./snapshots/NAS/Meta-Search-${arch}-N${n_way}-K${k_shot}-cut${cutout}-${epoch} | ||||
|  | ||||
| CUDA_VISIBLE_DEVICES=${gpus} python ./exps-nas/meta_search.py \ | ||||
| 	--data_path $TORCH_HOME/tiered-imagenet \ | ||||
| 	--arch ${arch} --n_way ${n_way} --k_shot ${k_shot} \ | ||||
| 	--save_path ${SAVED} \ | ||||
| 	--learning_rate_max 0.001 --learning_rate_min 0.0001 --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-cut.config \ | ||||
| 	--print_freq 200 --workers 16 | ||||
							
								
								
									
										29
									
								
								TEMP/search-acc-simple.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								TEMP/search-acc-simple.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,29 @@ | ||||
| #!/usr/bin/env sh | ||||
| if [ "$#" -ne 2 ] ;then | ||||
|   echo "Input illegal number of parameters " $# | ||||
|   echo "Need 2 parameters for the GPUs and the network" | ||||
|   exit 1                | ||||
| fi  | ||||
| if [ "$TORCH_HOME" = "" ]; then | ||||
|   echo "Must set TORCH_HOME envoriment variable for data dir saving" | ||||
|   exit 1 | ||||
| else | ||||
|   echo "TORCH_HOME : $TORCH_HOME" | ||||
| fi | ||||
|  | ||||
| gpus=$1 | ||||
| arch=$2 | ||||
| cutout=0 | ||||
| dataset=cifar10 | ||||
| epoch=100 | ||||
| SAVED=./snapshots/NAS/ACC-V2-Search-${arch}-${dataset}-cut${cutout}-${epoch}-E100 | ||||
|  | ||||
| CUDA_VISIBLE_DEVICES=${gpus} python ./exps-nas/acc_search_v2.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-simple.config \ | ||||
| 	--print_freq 100 --workers 8 | ||||
							
								
								
									
										29
									
								
								TEMP/search-acc-v2-E150.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								TEMP/search-acc-v2-E150.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,29 @@ | ||||
| #!/usr/bin/env sh | ||||
| if [ "$#" -ne 2 ] ;then | ||||
|   echo "Input illegal number of parameters " $# | ||||
|   echo "Need 2 parameters for the GPUs and the network" | ||||
|   exit 1                | ||||
| fi  | ||||
| if [ "$TORCH_HOME" = "" ]; then | ||||
|   echo "Must set TORCH_HOME envoriment variable for data dir saving" | ||||
|   exit 1 | ||||
| else | ||||
|   echo "TORCH_HOME : $TORCH_HOME" | ||||
| fi | ||||
|  | ||||
| gpus=$1 | ||||
| arch=$2 | ||||
| cutout=0 | ||||
| dataset=cifar10 | ||||
| epoch=150 | ||||
| SAVED=./snapshots/NAS/ACC-V2-Search-${arch}-${dataset}-cut${cutout}-${epoch}-E600 | ||||
|  | ||||
| CUDA_VISIBLE_DEVICES=${gpus} python ./exps-nas/acc_search_v2.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 \ | ||||
| 	--print_freq 100 --workers 8 | ||||
							
								
								
									
										29
									
								
								TEMP/search-acc-v2-E200.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								TEMP/search-acc-v2-E200.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,29 @@ | ||||
| #!/usr/bin/env sh | ||||
| if [ "$#" -ne 2 ] ;then | ||||
|   echo "Input illegal number of parameters " $# | ||||
|   echo "Need 2 parameters for the GPUs and the network" | ||||
|   exit 1                | ||||
| fi  | ||||
| if [ "$TORCH_HOME" = "" ]; then | ||||
|   echo "Must set TORCH_HOME envoriment variable for data dir saving" | ||||
|   exit 1 | ||||
| else | ||||
|   echo "TORCH_HOME : $TORCH_HOME" | ||||
| fi | ||||
|  | ||||
| gpus=$1 | ||||
| arch=$2 | ||||
| cutout=0 | ||||
| dataset=cifar10 | ||||
| epoch=200 | ||||
| SAVED=./snapshots/NAS/ACC-V2-Search-${arch}-${dataset}-cut${cutout}-${epoch}-E600 | ||||
|  | ||||
| CUDA_VISIBLE_DEVICES=${gpus} python ./exps-nas/acc_search_v2.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 \ | ||||
| 	--print_freq 100 --workers 8 | ||||
							
								
								
									
										29
									
								
								TEMP/search-acc-v2-E300.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								TEMP/search-acc-v2-E300.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,29 @@ | ||||
| #!/usr/bin/env sh | ||||
| if [ "$#" -ne 2 ] ;then | ||||
|   echo "Input illegal number of parameters " $# | ||||
|   echo "Need 2 parameters for the GPUs and the network" | ||||
|   exit 1                | ||||
| fi  | ||||
| if [ "$TORCH_HOME" = "" ]; then | ||||
|   echo "Must set TORCH_HOME envoriment variable for data dir saving" | ||||
|   exit 1 | ||||
| else | ||||
|   echo "TORCH_HOME : $TORCH_HOME" | ||||
| fi | ||||
|  | ||||
| gpus=$1 | ||||
| arch=$2 | ||||
| cutout=0 | ||||
| dataset=cifar10 | ||||
| epoch=300 | ||||
| SAVED=./snapshots/NAS/ACC-V2-Search-${arch}-${dataset}-cut${cutout}-${epoch}-E600 | ||||
|  | ||||
| CUDA_VISIBLE_DEVICES=${gpus} python ./exps-nas/acc_search_v2.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 \ | ||||
| 	--print_freq 100 --workers 8 | ||||
							
								
								
									
										29
									
								
								TEMP/search-acc-v2-E50.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								TEMP/search-acc-v2-E50.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,29 @@ | ||||
| #!/usr/bin/env sh | ||||
| if [ "$#" -ne 2 ] ;then | ||||
|   echo "Input illegal number of parameters " $# | ||||
|   echo "Need 2 parameters for the GPUs and the network" | ||||
|   exit 1                | ||||
| fi  | ||||
| if [ "$TORCH_HOME" = "" ]; then | ||||
|   echo "Must set TORCH_HOME envoriment variable for data dir saving" | ||||
|   exit 1 | ||||
| else | ||||
|   echo "TORCH_HOME : $TORCH_HOME" | ||||
| fi | ||||
|  | ||||
| gpus=$1 | ||||
| arch=$2 | ||||
| cutout=0 | ||||
| dataset=cifar10 | ||||
| epoch=50 | ||||
| SAVED=./snapshots/NAS/ACC-V2-Search-${arch}-${dataset}-cut${cutout}-${epoch}-E600 | ||||
|  | ||||
| CUDA_VISIBLE_DEVICES=${gpus} python ./exps-nas/acc_search_v2.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 \ | ||||
| 	--print_freq 100 --workers 8 | ||||
							
								
								
									
										29
									
								
								TEMP/search-acc-v2.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								TEMP/search-acc-v2.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,29 @@ | ||||
| #!/usr/bin/env sh | ||||
| if [ "$#" -ne 2 ] ;then | ||||
|   echo "Input illegal number of parameters " $# | ||||
|   echo "Need 2 parameters for the GPUs and the network" | ||||
|   exit 1                | ||||
| fi  | ||||
| if [ "$TORCH_HOME" = "" ]; then | ||||
|   echo "Must set TORCH_HOME envoriment variable for data dir saving" | ||||
|   exit 1 | ||||
| else | ||||
|   echo "TORCH_HOME : $TORCH_HOME" | ||||
| fi | ||||
|  | ||||
| gpus=$1 | ||||
| arch=$2 | ||||
| cutout=0 | ||||
| dataset=cifar10 | ||||
| epoch=100 | ||||
| SAVED=./snapshots/NAS/ACC-V2-Search-${arch}-${dataset}-cut${cutout}-${epoch}-E600 | ||||
|  | ||||
| CUDA_VISIBLE_DEVICES=${gpus} python ./exps-nas/acc_search_v2.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 \ | ||||
| 	--print_freq 100 --workers 8 | ||||
							
								
								
									
										45
									
								
								TEMP/search.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								TEMP/search.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,45 @@ | ||||
| #!/usr/bin/env sh | ||||
| if [ "$#" -ne 3 ] ;then | ||||
|   echo "Input illegal number of parameters " $# | ||||
|   echo "Need 3 parameters for the GPUs and the network and the dataset" | ||||
|   exit 1                | ||||
| fi  | ||||
| if [ "$TORCH_HOME" = "" ]; then | ||||
|   echo "Must set TORCH_HOME envoriment variable for data dir saving" | ||||
|   exit 1 | ||||
| else | ||||
|   echo "TORCH_HOME : $TORCH_HOME" | ||||
| fi | ||||
|  | ||||
| gpus=$1 | ||||
| arch=$2 | ||||
| cutout=0 | ||||
| dataset=$3 | ||||
| epoch=50 | ||||
| SAVED=./snapshots/NAS/Search-${arch}-${dataset}-cut${cutout}-${epoch} | ||||
|  | ||||
| if [ "$dataset" == "cifar10" ] ;then | ||||
|   dataset_root=$TORCH_HOME/cifar.python | ||||
|   print_freq=100 | ||||
| elif [ "$dataset" == "cifar100" ] ;then | ||||
|   dataset_root=$TORCH_HOME/cifar.python | ||||
|   print_freq=100 | ||||
| elif [ "$dataset" == "tiered" ] ;then | ||||
|   dataset_root=$TORCH_HOME/tiered-imagenet | ||||
|   print_freq=500 | ||||
| else | ||||
|   echo 'invalid dataset-name :'${dataset} | ||||
|   exit 1 | ||||
| fi | ||||
|  | ||||
| CUDA_VISIBLE_DEVICES=${gpus} python ./exps-nas/train_search.py \ | ||||
| 	--data_path ${dataset_root} \ | ||||
| 	--arch ${arch} \ | ||||
| 	--dataset ${dataset} --batch_size 64 \ | ||||
| 	--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 \ | ||||
| 	--manualSeed 3858 \ | ||||
| 	--model_config ./configs/nas-cifar-cos.config \ | ||||
| 	--print_freq ${print_freq} --workers 8 | ||||
							
								
								
									
										9
									
								
								TEMP/vis.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								TEMP/vis.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| #!/usr/bin/env sh | ||||
|  | ||||
| seeds="seed-8167  seed-908  seed-9242" | ||||
| for seed in ${seeds}; do | ||||
| python ./exps-nas/vis-arch.py --checkpoint ./snapshots/NAS/Search-cifar10-cut16-100/${seed}/checkpoint-search.pth \ | ||||
|                               --save_dir   ./snapshots/NAS-VIS/Search-cut16-100/${seed} | ||||
| done | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user