summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-13 23:40:30 +0100
committerskal <pascal.massimino@gmail.com>2026-02-13 23:40:30 +0100
commit25044d63057cdb134cc3930bb67b178cff1aebb4 (patch)
treebf00411b0af159ef090dc9cffbd8c6dd793f1cff /tools
parent87a27bf022d7fba68e3a945ee29c854c6e1ae2d7 (diff)
CNN v2: Fix Layer 0 visualization scale (was 0.5, now 1.0)
Layer 0 output is clamped [0,1], does not need 0.5 dimming. Middle layers (ReLU) keep 0.5 scale for values >1. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/cnn_v2_test/index.html3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/cnn_v2_test/index.html b/tools/cnn_v2_test/index.html
index 3977d9f..73a9f55 100644
--- a/tools/cnn_v2_test/index.html
+++ b/tools/cnn_v2_test/index.html
@@ -1527,7 +1527,8 @@ class CNNTester {
continue;
}
- const vizScale = layerIdx === 0 ? 1.0 : 0.5; // Static: 1.0, CNN layers: 0.5 (4 channels [0,1])
+ // Static features: 1.0, Layer 0: 1.0 (clamped [0,1]), Middle layers: 0.5 (ReLU, can be >1)
+ const vizScale = (layerIdx === 0 || layerIdx === 1) ? 1.0 : 0.5;
const paramsBuffer = this.device.createBuffer({
size: 8,
usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST