102->201 / NAS->autoDL / more configs of TAS / reorganize docs / fix bugs in NAS baselines
This commit is contained in:
		| @@ -30,6 +30,7 @@ elif [ ${dataset} == 'imagenet-1k' ]; then | ||||
|   workers=28 | ||||
|   cutout_length=-1 | ||||
| else | ||||
|   exit 1 | ||||
|   echo 'Unknown dataset: '${dataset} | ||||
| fi | ||||
|  | ||||
|   | ||||
| @@ -22,30 +22,44 @@ batch=256 | ||||
|  | ||||
| save_dir=./output/search-shape/TAS-INFER-${dataset}-${model} | ||||
|  | ||||
| if [ ${dataset} == 'cifar10' ] || [ ${dataset} == 'cifar100' ]; then | ||||
|   xpath=$TORCH_HOME/cifar.python | ||||
|   opt_config=./configs/opts/CIFAR-E300-W5-L1-COS.config | ||||
|   workers=4 | ||||
| elif [ ${dataset} == 'imagenet-1k' ]; then | ||||
|   xpath=$TORCH_HOME/ILSVRC2012 | ||||
|   #opt_config=./configs/opts/ImageNet-E120-Cos-Smooth.config | ||||
|   opt_config=./configs/opts/RImageNet-E120-Cos-Soft.config | ||||
|   workers=28 | ||||
| else | ||||
|   echo 'Unknown dataset: '${dataset} | ||||
|   exit 1 | ||||
| fi | ||||
|  | ||||
| python --version | ||||
|  | ||||
| # normal training | ||||
| xsave_dir=${save_dir}-NMT | ||||
| OMP_NUM_THREADS=4 python ./exps/basic-main.py --dataset ${dataset} \ | ||||
| 	--data_path $TORCH_HOME/cifar.python \ | ||||
| 	--data_path ${xpath} \ | ||||
| 	--model_config ./configs/NeurIPS-2019/${model}.config \ | ||||
| 	--optim_config ./configs/opts/CIFAR-E300-W5-L1-COS.config \ | ||||
| 	--optim_config ${opt_config} \ | ||||
| 	--procedure    basic \ | ||||
| 	--save_dir     ${xsave_dir} \ | ||||
| 	--cutout_length -1 \ | ||||
| 	--batch_size ${batch} --rand_seed ${rseed} --workers 6 \ | ||||
| 	--batch_size ${batch} --rand_seed ${rseed} --workers ${workers} \ | ||||
| 	--eval_frequency 1 --print_freq 100 --print_freq_eval 200 | ||||
|  | ||||
| # KD training | ||||
| xsave_dir=${save_dir}-KDT | ||||
| OMP_NUM_THREADS=4 python ./exps/KD-main.py --dataset ${dataset} \ | ||||
| 	--data_path $TORCH_HOME/cifar.python \ | ||||
| 	--data_path ${xpath} \ | ||||
| 	--model_config ./configs/NeurIPS-2019/${model}.config \ | ||||
| 	--optim_config  ./configs/opts/CIFAR-E300-W5-L1-COS.config \ | ||||
| 	--optim_config  ${opt_config} \ | ||||
| 	--KD_checkpoint ./.latent-data/basemodels/${dataset}/${model}.pth \ | ||||
| 	--procedure    Simple-KD \ | ||||
| 	--save_dir     ${xsave_dir} \ | ||||
| 	--KD_alpha 0.9 --KD_temperature 4 \ | ||||
| 	--cutout_length -1 \ | ||||
| 	--batch_size ${batch} --rand_seed ${rseed} --workers 6 \ | ||||
| 	--batch_size ${batch} --rand_seed ${rseed} --workers ${workers} \ | ||||
| 	--eval_frequency 1 --print_freq 100 --print_freq_eval 200 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user