summaryrefslogtreecommitdiff
path: root/sdil/probes.py
diff options
context:
space:
mode:
authorYurenHao0426 <Blackhao0426@gmail.com>2026-07-22 03:33:44 -0500
committerYurenHao0426 <Blackhao0426@gmail.com>2026-07-22 03:33:44 -0500
commitdcadaff8622e6c8b3450f12f45447f605c68556a (patch)
tree73520eed83b877075d6cd6bd53feec5a04e944ff /sdil/probes.py
parent6bb9eb645af3dcf8e122e82c5158b5cc10ca2253 (diff)
method: condition apical vectorizers on neural state
Diffstat (limited to 'sdil/probes.py')
-rw-r--r--sdil/probes.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/sdil/probes.py b/sdil/probes.py
index 1698d75..0075bca 100644
--- a/sdil/probes.py
+++ b/sdil/probes.py
@@ -74,7 +74,7 @@ def alignment_report(net, x, y, y_onehot, cfg):
negg = -g
teaching, a, innovation = core.teaching_signal(
net, l, c, h[l + 1], cfg, context)
- Ac = c @ net.A[l].t() # pure vectorizer output
+ Ac = net.vectorizer(l, c, h[l + 1], context) # pure vectorizer output
traffic = net.apical_traffic(l, h[l + 1], context)
unexplained = traffic - net.baseline(l, h[l + 1])
# include the phi' gain that the plasticity rule actually applies,
@@ -145,6 +145,8 @@ def _clone(net):
n.W = [w.clone() for w in net.W]
n.b = [b.clone() for b in net.b]
n.A = [a.clone() for a in net.A]
+ n.A_gate = ([a.clone() for a in net.A_gate]
+ if getattr(net, "A_gate", None) is not None else None)
n.P = [p.clone() for p in net.P]
n.P_bias = ([p.clone() for p in net.P_bias]
if getattr(net, "P_bias", None) is not None else None)