Thu, 30 Jul 2026 09:27:44 -0500
Ensure that transport is reset if no spike was left at endpoint after weight optimisation
| src/sliding_fb.rs | file | annotate | diff | comparison | revisions |
--- a/src/sliding_fb.rs Wed Jul 29 00:08:14 2026 -0500 +++ b/src/sliding_fb.rs Thu Jul 30 09:27:44 2026 -0500 @@ -873,7 +873,9 @@ // the `ε` here. That way, `d` is in its entirely multiplied by τ, as is `t`, // making all factors independent of τ. let maybe_excess = match ρ.α_γ.total_cmp(&0.0) { - Greater => (δ.α >= 0.0).then(|| { + // Note, the δ.α > 0 (and < 0) restriction will cause the transport to be reset, + // if no spike was left at the target point after weight optimisation. + Greater => (δ.α > 0.0).then(|| { let gvx = v.differential(&ρ.x); let d = if tconfig.alt_remainder_control { let τv̆y = τv̆.apply(&ρ.y); @@ -888,7 +890,7 @@ }; d * ρ.α_γ }), - Less => (δ.α <= 0.0).then(|| { + Less => (δ.α < 0.0).then(|| { let gvx = v.differential(&ρ.x); let d = if tconfig.alt_remainder_control { let τv̆y = τv̆.apply(&ρ.y);