From 6090412572f75cf4480d1ee718bb189b85abc39a Mon Sep 17 00:00:00 2001 From: jgrusewski Date: Mon, 20 Apr 2026 22:28:03 +0200 Subject: [PATCH] =?UTF-8?q?cleanup(fflag):=20delete=20dead=20use=5Fspectra?= =?UTF-8?q?l=5Fnorm/use=5Fresidual=20in=20QNetworkConfig=20=E2=80=94=20[FF?= =?UTF-8?q?LAG-005]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QNetworkConfig had three write-only fields with zero workspace readers: use_spectral_norm, spectral_norm_iterations, use_residual. Defaults set at the single Default impl, never checked in forward/backward. Deleted all three + their Default init. use_gpu kept — line 138 gates CUDA construction and errors without it (genuine sanity check). --- crates/ml-dqn/src/network.rs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/crates/ml-dqn/src/network.rs b/crates/ml-dqn/src/network.rs index c95ab38ad..dde1e1ea6 100644 --- a/crates/ml-dqn/src/network.rs +++ b/crates/ml-dqn/src/network.rs @@ -78,14 +78,8 @@ pub struct QNetworkConfig { /// High dropout early prevents overfitting, low dropout late allows fine-tuning /// (Wave 26 P1.6) pub dropout_schedule: Option<(f64, f64, usize)>, - /// Whether to use `GPU` acceleration + /// Whether to use `GPU` acceleration (CUDA required — checked at construction). pub use_gpu: bool, - /// Whether to use spectral normalization for Q-value stability - pub use_spectral_norm: bool, - /// Number of power iterations for spectral norm estimation - pub spectral_norm_iterations: usize, - /// Whether to use residual connections (Wave 26 P0.4) - pub use_residual: bool, } impl Default for QNetworkConfig { @@ -99,10 +93,6 @@ impl Default for QNetworkConfig { dropout_prob: 0.2, dropout_schedule: None, // No adaptive dropout by default use_gpu: true, - use_spectral_norm: false, // Disabled by default, enable for unstable training - spectral_norm_iterations: 1, // 1 iteration is typically sufficient - use_residual: false, // Disabled by default, opt-in for deeper networks (Wave 26 P0.4) - } } }