Official code repository of SSDA
-
Download dataset following the instructions from here
-
Train source model using the following command:
python train_source.py --dset=office-home --max_epoch=100 --attack_type=badnet --device=cuda:0 --s=0 -
Train target model without defense and save the pseudo labels for knowledge transfer using the following command
python train_target.py --dset=office-home --max_epoch=15 --attack_type=badnet --save_knowledge --device=cuda:0 --s=0 -
Finally, train target model using SSDA
python train_target_defend_main.py --dset=office-home --max_epoch=15 --attack_type=badnet --clip --clip_val=1.0 --defend --device=cuda:0 --s=0