-
Notifications
You must be signed in to change notification settings - Fork 1
/
run_cifar40_classes_alexnet.sh
33 lines (16 loc) · 3.85 KB
/
run_cifar40_classes_alexnet.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# CIFAR-100 10 class ALEXNET runs
# train dcgan for cifar-100 40 classes
CUDA_VISIBLE_DEVICES=0 python ./code/train_generator/dcgan.py --dataroot ./data/ --dataset cifar100 --imageSize 32 --cuda --outf ./cifar100_run_models/alexnet/cifar_40/dcgan/ --manualSeed 108 --niter 200 --batchSize 64 --network alexnet --proxy_ds_name 40_class --teacher_path ./teacher_models/cifar10_alexnet_teacher_79.pth --num_classes 10
#mkdir val_data
CUDA_VISIBLE_DEVICES=0 python ./code/train_student/generate_val_data.py --dcgan_netG ./cifar100_run_models/alexnet/cifar_40/dcgan/netG_epoch_199.pth --dcgan_out ./val_data/dcgan_val_data_cifar_40_alexnet.pkl --teacher_path ./teacher_models/cifar10_alexnet_teacher_79.pth --network alexnet
# Hard label runs
CUDA_VISIBLE_DEVICES=0 python ./code/train_student/train_student.py --from_scratch --dcgan_netG ./cifar100_run_models/alexnet/cifar_40/dcgan/netG_epoch_199.pth --count 1 --network alexnet --dcgan_data --dcgan_data_ratio 0.5 --proxy_data --proxy_data_ratio 1 --pad_crop --name proxy_dcgan_45k_40_class_rand --proxy_ds_name 40_class --val_data_dcgan ./val_data/dcgan_val_data_cifar_40_alexnet.pkl --teacher_path ./teacher_models/cifar10_alexnet_teacher_79.pth --true_dataset cifar10 --num_classes 10 --proxy_dataset cifar100
# ./train_student/checkpoint/alexnet/cifar10_cifar100/1/last_epoch_best_student_model_proxy_dcgan_45k_40_class_rand.pth
# Run div gan
CUDA_VISIBLE_DEVICES=0 python ./code/train_generator/train_gen.py --dataroot ./data/ --dataset cifar100 --imageSize 32 --cuda --outf ./cifar100_run_models/alexnet/out_step2_0_10/40_class/2/ --manualSeed 108 --niter 100 --batchSize 64 --netG ./cifar100_run_models/alexnet/cifar_40/dcgan/netG_epoch_199.pth --student_path ./train_student/checkpoint/alexnet/cifar10_cifar100/1/last_epoch_best_student_model_proxy_dcgan_45k_40_class_rand.pth --network alexnet --c_l 0 --d_l 10 --proxy_ds_name 40_class --true_dataset cifar10 --num_classes 10
# DivGAN + Random Crop (student trained from scratch on 0.5*Proxy + 0.5*DivGAN )
CUDA_VISIBLE_DEVICES=0 python code/train_student/train_student.py --div_gan_netG ./cifar100_run_models/alexnet/out_step2_0_10/40_class/2/netG_epoch_99.pth --dcgan_netG ./cifar100_run_models/alexnet/cifar_40/dcgan/netG_epoch_199.pth --count 2 --network alexnet --pad_crop --div_gan_data --div_gan_data_ratio 0.5 --proxy_data --proxy_data_ratio 1 --from_scratch --name from_scratch_div_gan_05_40_class --proxy_ds_name 40_class --val_data_dcgan ./val_data/dcgan_val_data_cifar_40_alexnet.pkl --teacher_path ./teacher_models/cifar10_alexnet_teacher_79.pth --proxy_dataset cifar100 --true_dataset cifar10 --num_classes 10
CUDA_VISIBLE_DEVICES=0 python ./code/train_student/generate_val_data.py --div_gan_netG ./cifar100_run_models/alexnet/out_step2_0_10/40_class/2/netG_epoch_99.pth --network alexnet --div_gan_out ./val_data/div_gan_val_data_cifar_40_alexnet.pkl --teacher_path ./teacher_models/cifar10_alexnet_teacher_79.pth
# ./train_student/checkpoint/alexnet/cifar10_cifar100_div_gan/2/last_epoch_best_student_model_from_scratch_div_gan_05_40_class.pth
# Alternate training
CUDA_VISIBLE_DEVICES=0 python ./code/train_generator/train_generator_clone.py --dataroot ./data/ --dataset cifar100 --imageSize 32 --cuda --outf ./cifar100_run_models/alexnet/out_step2/cifar_40/0_500/ --manualSeed 108 --niter 400 --batchSize 64 --netG ./cifar100_run_models/alexnet/out_step2_0_10/40_class/2/netG_epoch_99.pth --student_path ./train_student/checkpoint/alexnet/cifar10_cifar100_div_gan/2/last_epoch_best_student_model_from_scratch_div_gan_05_40_class.pth --network alexnet --teacher_path ./teacher_models/cifar10_alexnet_teacher_79.pth --warmup --name warmup_altr_0_500_1_p10 --auto-augment --c_l 0 --d_l 500 --proxy_ds_name 40_class --val_data_dcgan ./val_data/dcgan_val_data_cifar_40_alexnet.pkl --val_data_degan ./val_data/div_gan_val_data_cifar_40_alexnet.pkl --true_dataset cifar10 --num_classes 10