Closed mzweilin closed 1 year ago
Make Adversary's Trainer accept loggers, so that we can log gradients of perturbation, etc.
Example
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]
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.
pre-commit run -a
Make sure you had fun coding 🙃
What does this PR do?
Make Adversary's Trainer accept loggers, so that we can log gradients of perturbation, etc.
Example
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.
Before submitting
pre-commit run -a
command without errorsDid you have fun?
Make sure you had fun coding 🙃