src/sliding_fb.rs

changeset 82
afb3ce40cff6
parent 81
642141008293
child 83
66b8ac0ebe00
--- 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);

mercurial