diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-14 02:12:12 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-14 02:12:12 +0100 |
| commit | 043044ae7563c2f92760c428765e35b411da82ea (patch) | |
| tree | 0d640fec1517169d195747707b6c589c92fe7161 /src/tests/audio/test_tracker_timing.cc | |
| parent | 4d119a1b6a6f460ca6d5a8ef85176c45663fd40a (diff) | |
Replace hard clamp with sigmoid activation in CNN v2
Fixes training collapse where p1/p2 channels saturate due to gradient
blocking at clamp boundaries. Sigmoid provides smooth [0,1] mapping
with continuous gradients.
Changes:
- Layer 0: clamp(x, 0, 1) → sigmoid(x)
- Final layer: clamp(x, 0, 1) → sigmoid(x)
- Middle layers: ReLU unchanged (already stable)
Updated files:
- training/train_cnn_v2.py: PyTorch model activations
- workspaces/main/shaders/cnn_v2/cnn_v2_compute.wgsl: WGSL shader
- tools/cnn_v2_test/index.html: HTML validation tool
- doc/CNN_V2.md: Documentation
Validation:
- Build clean (no shader errors)
- 34/36 tests pass (2 unrelated script tests fail)
- 10-epoch training: loss 0.153 → 0.088 (good convergence)
- cnn_test processes images successfully
Breaking change: Old checkpoints trained with clamp() incompatible.
Retrain from scratch required.
handoff(Claude): CNN v2 sigmoid activation implemented and validated.
Diffstat (limited to 'src/tests/audio/test_tracker_timing.cc')
0 files changed, 0 insertions, 0 deletions
