Closed mzweilin closed 1 year ago
Now I can see gradient logs on Tensorboard.
CUDA_VISIBLE_DEVICES=0 \
python -m mart \
experiment=CIFAR10_CNN_Adv \
fit=false \
trainer=gpu \
+trainer.limit_test_batches=1 \
+callbacks@model.modules.input_adv_test.callbacks=gradient_monitor \
+model.modules.input_adv_test.callbacks.gradient_monitor.frequency=1 \
+logger@model.modules.input_adv_test.logger=[tensorboard]
I also doubt there is a logger associated with the adversary's trainer.
Close in favor of #160
What does this PR do?
Hide the
Adversary
modules instead ofAdversary.Perturber
, so that we can make use of allTrainer
features inAdversary
.We may configure not to hide
Adversary
for computing universal perturbations.Depends on #144
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
python -m mart experiment=CIFAR10_CNN_Adv trainer=gpu trainer.precision=16
reports 70.23%Before submitting
pre-commit run -a
command without errorsDid you have fun?
Make sure you had fun coding 🙃