summaryrefslogtreecommitdiff
path: root/experiments/conv_local_smoke.py
diff options
context:
space:
mode:
authorYurenHao0426 <Blackhao0426@gmail.com>2026-07-22 16:47:55 -0500
committerYurenHao0426 <Blackhao0426@gmail.com>2026-07-22 16:47:55 -0500
commit293785af4c9a556f388f04bcf9599aaee9e9dfd9 (patch)
tree1234f2dba19c67d5586a226a13f2e954910623c8 /experiments/conv_local_smoke.py
parentc8dd2e591c9835b8618fc34bc1d043634ce345e1 (diff)
experiment: add one-sided residual stability margin
Diffstat (limited to 'experiments/conv_local_smoke.py')
-rw-r--r--experiments/conv_local_smoke.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/experiments/conv_local_smoke.py b/experiments/conv_local_smoke.py
index 802051b..dbae759 100644
--- a/experiments/conv_local_smoke.py
+++ b/experiments/conv_local_smoke.py
@@ -997,6 +997,15 @@ def kp_mixed_traffic_checks():
for slope, bias in zip(net.P_traffic, net.P_traffic_bias):
slope.zero_()
bias.zero_()
+ stable_fit = net.predictor_closed_form_fit(
+ forward["hiddens"], stability_margin=1e-3)
+ assert stable_fit["max_positive_residual_soma_slope"] < 1e-14
+ assert stable_fit["min_residual_soma_slope"] < -9e-4
+ assert stable_fit["max_applied_stability_margin"] >= 1e-3
+
+ for slope, bias in zip(net.P_traffic, net.P_traffic_bias):
+ slope.zero_()
+ bias.zero_()
components = net.mixed_apical_components(
instruction, forward["hiddens"], "matched")
norm_errors = []