Closed mzweilin closed 12 months ago
Adversary
LitModular
AdversaryConnector
train_adversary=None
model.attack_step()
Adversary.model_transform
Based on #185 , but we now set the merge target to main to see the whole picture.
main
Please check all relevant options.
Please describe the tests that you ran to verify your changes. Consider listing any relevant details of your test configuration.
pytest
CUDA_VISIBLE_DEVICES=0 python -m mart experiment=CIFAR10_CNN_Adv trainer=gpu trainer.precision=16
CUDA_VISIBLE_DEVICES=0,1 python -m mart experiment=CIFAR10_CNN_Adv trainer=ddp trainer.precision=16 trainer.devices=2 model.optimizer.lr=0.2 trainer.max_steps=2925 datamodule.ims_per_batch=256 datamodule.world_size=2
pre-commit run -a
Make sure you had fun coding 🙃
What does this PR do?
Adversary
out of model sequence, so that it works with models that are notLitModular
.AdversaryConnector
since we allowtrain_adversary=None
.model.attack_step()
.Adversary.model_transform
to change models before attack.Based on #185 , but we now set the merge target to
main
to see the whole picture.Type of change
Please check all relevant options.
Testing
Please describe the tests that you ran to verify your changes. Consider listing any relevant details of your test configuration.
pytest
CUDA_VISIBLE_DEVICES=0 python -m mart experiment=CIFAR10_CNN_Adv trainer=gpu trainer.precision=16
reports 70% (21 sec/epoch).CUDA_VISIBLE_DEVICES=0,1 python -m mart experiment=CIFAR10_CNN_Adv trainer=ddp trainer.precision=16 trainer.devices=2 model.optimizer.lr=0.2 trainer.max_steps=2925 datamodule.ims_per_batch=256 datamodule.world_size=2
reports 70% (14 sec/epoch).Before submitting
pre-commit run -a
command without errorsDid you have fun?
Make sure you had fun coding 🙃