计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
pgd_adversarial_training_loop【效率与协作】Run a deterministic PGD adversarial training loop that updates model parameters on adversarial examples and logs loss traces.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill for the outer minimization step in a Madry-style robust optimization recovery. It is designed for bounded experiments where the model can generate adversarial examples with the current parameters and then update parameters on those examples.
Do not use it to claim robust training if no PGD examples are generated or no trainable parameters change.
loss_before, loss_after, params_before, and params_after.Run:
python scripts/adversarial_train.py --self-test
python tests/test_adversarial_train.py
The included script is a deterministic reduced proxy using a tiny logistic classifier. Full MNIST/CIFAR recovery requires a real deep-learning runtime and dataset.