Skip to content

dat-2022/dat

Repository files navigation

DAT

The repo contains the training code for paper Distributed Adversarial Training to Robustify Deep Neural Networks at Scale. Source code is adapted from:

You Only Propagate Once: Accelerating Adversarial Training via Maximal Principle

Pytorch-lamb

Train with Imagenet with DAT-PGD :

python main.py --dataset imagenet \
               --batch-size <BATCH SIZE> \
               --world-size <NUMBER OF NODES> \
               --rank <RANK> \
               --dist-url "tcp://<MASTER IP>:<PORT>" \
               --dataset-path <PATH TO IMAGENET>\
               --num-epochs 30 \
               --output-dir <OUTPUT DIR> \
               --lr 0.01 

Train with Imagenet with DAT-FGSM :

python main.py --dataset imagenet \
               --batch-size <BATCH SIZE> \
               --world-size <NUMBER OF NODES> \
               --rank <RANK> \
               --dist-url "tcp://<MASTER IP>:<PORT>" \
               --dataset-path <PATH TO IMAGENET>\
               --num-epochs 30 \
               --output-dir <OUTPUT DIR> \
               --lr 0.01 \
               --fast

Our pretrianed Imagenet models are under here.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages