summaryrefslogtreecommitdiff
path: root/doc/CNN_V2.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/CNN_V2.md')
-rw-r--r--doc/CNN_V2.md9
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/CNN_V2.md b/doc/CNN_V2.md
index abef606..fa00b32 100644
--- a/doc/CNN_V2.md
+++ b/doc/CNN_V2.md
@@ -18,11 +18,12 @@ CNN v2 extends the original CNN post-processing effect with parametric static fe
- Bias integrated as static feature dimension
- Storage buffer architecture (dynamic layer count)
- Binary weight format v2 for runtime loading
+- Sigmoid activation for layer 0 and final layer (smooth [0,1] mapping)
**Status:** ✅ Complete. Training pipeline functional, validation tools ready, mip-level support integrated.
**Known Issues:**
-- ⚠️ **cnn_test output differs from HTML validation tool** - Visual discrepancy remains after fixing uv_y inversion and Layer 0 activation. Root cause under investigation. Both tools should produce identical output given same weights/input.
+- ⚠️ **Old checkpoints incompatible** - Models trained with `clamp()` activation won't work correctly with new `sigmoid()` implementation. Retrain from scratch with latest code.
**TODO:**
- 8-bit quantization with QAT for 2× size reduction (~1.6 KB)
@@ -106,6 +107,12 @@ Input RGBD → Static Features Compute → CNN Layers → Output RGBA
- All layers: uniform 12D input, 4D output (ping-pong buffer)
- Storage: `texture_storage_2d<rgba32uint>` (4 channels as 2×f16 pairs)
+**Activation Functions:**
+- Layer 0 & final layer: `sigmoid(x)` for smooth [0,1] mapping
+- Middle layers: `ReLU` (max(0, x))
+- Rationale: Sigmoid prevents gradient blocking at boundaries, enabling better convergence
+- Breaking change: Models trained with `clamp(x, 0, 1)` are incompatible, retrain required
+
---
## Static Features (7D + 1 bias)