diff options
| author | YurenHao0426 <Blackhao0426@gmail.com> | 2026-07-22 05:00:28 -0500 |
|---|---|---|
| committer | YurenHao0426 <Blackhao0426@gmail.com> | 2026-07-22 05:00:28 -0500 |
| commit | 7b6cdfb9656d3b59edae442c99ba3412ecc32cfc (patch) | |
| tree | 8af7c96539a510454bbc7695a8d659b6a5dc5e42 /experiments/protocol_smoke.py | |
| parent | 0660bd1f6274e7982438506eec67870b105a0285 (diff) | |
sdil: add feedback-first apical calibration
Diffstat (limited to 'experiments/protocol_smoke.py')
| -rw-r--r-- | experiments/protocol_smoke.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/experiments/protocol_smoke.py b/experiments/protocol_smoke.py index 18de4c9..7ee9b4b 100644 --- a/experiments/protocol_smoke.py +++ b/experiments/protocol_smoke.py @@ -59,6 +59,9 @@ def main(): net, SDILConfig(pert_ndirs=2, pert_mode="simultaneous")) layerwise = calibration_work_per_event( net, SDILConfig(pert_ndirs=2, pert_mode="layerwise")) + overridden = calibration_work_per_event( + net, SDILConfig(pert_ndirs=1, pert_mode="simultaneous"), + pert_mode="layerwise", pert_ndirs=2) assert simultaneous == { "batch_loss_evaluations": 4, "forward_equivalent_batches": 5.0, @@ -66,6 +69,7 @@ def main(): } assert layerwise["batch_loss_evaluations"] == 9 assert abs(layerwise["forward_equivalent_batches"] - 11.0 / 3.0) < 1e-12 + assert overridden == layerwise lesion_net = SDILNet([1, 4, 4, 4, 4, 2], act="relu", residual=True, device="cpu") lesion_x = torch.linspace(0, 1, 16).view(-1, 1) |
