| 
									
										
										
										
											2019-02-01 01:27:38 +11:00
										 |  |  | #!/usr/bin/env sh
 | 
					
						
							| 
									
										
										
										
											2019-02-01 04:03:35 +11:00
										 |  |  | # bash scripts-cnn/train-cifar.sh 0 GDAS cifar10 cut | 
					
						
							|  |  |  | if [ "$#" -ne 4 ] ;then | 
					
						
							| 
									
										
										
										
											2019-02-01 01:27:38 +11:00
										 |  |  |   echo "Input illegal number of parameters " $# | 
					
						
							| 
									
										
										
										
											2019-02-01 04:03:35 +11:00
										 |  |  |   echo "Need 4 parameters for the GPUs, the architecture, and the dataset-name, and the cutout" | 
					
						
							| 
									
										
										
										
											2019-02-01 01:27:38 +11:00
										 |  |  |   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 | 
					
						
							| 
									
										
										
										
											2019-02-01 03:23:55 +11:00
										 |  |  | dataset=$3 | 
					
						
							| 
									
										
										
										
											2019-02-01 04:03:35 +11:00
										 |  |  | cutout=$4 | 
					
						
							|  |  |  | SAVED=./snapshots/NAS/${arch}-${dataset}-${cutout}-E600 | 
					
						
							| 
									
										
										
										
											2019-03-30 00:50:18 +08:00
										 |  |  | #--data_path $TORCH_HOME/cifar.python \ | 
					
						
							| 
									
										
										
										
											2019-02-01 01:27:38 +11:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-01 04:03:35 +11:00
										 |  |  | CUDA_VISIBLE_DEVICES=${gpus} python ./exps-cnn/train_base.py \
 | 
					
						
							| 
									
										
										
										
											2019-03-30 00:50:18 +08:00
										 |  |  | 	--data_path ./data/data/cifar.python \
 | 
					
						
							| 
									
										
										
										
											2019-02-01 01:27:38 +11:00
										 |  |  | 	--dataset ${dataset} --arch ${arch} \
 | 
					
						
							|  |  |  | 	--save_path ${SAVED} \
 | 
					
						
							|  |  |  | 	--grad_clip 5 \
 | 
					
						
							|  |  |  | 	--init_channels 36 --layers 20 \
 | 
					
						
							| 
									
										
										
										
											2019-02-01 04:03:35 +11:00
										 |  |  | 	--model_config ./configs/nas-cifar-cos-${cutout}.config \
 | 
					
						
							| 
									
										
										
										
											2019-02-01 01:27:38 +11:00
										 |  |  | 	--print_freq 100 --workers 8 |