diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/CNN_EFFECT.md | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/doc/CNN_EFFECT.md b/doc/CNN_EFFECT.md index b7d157f..d51c187 100644 --- a/doc/CNN_EFFECT.md +++ b/doc/CNN_EFFECT.md @@ -38,7 +38,7 @@ fn cnn_conv3x3_7to4( samp: sampler, uv: vec2<f32>, resolution: vec2<f32>, - original: vec4<f32>, # Original RGBD [0,1] + original: vec4<f32>, # Original RGBD [-1,1] weights: array<array<f32, 8>, 36> # 9 pos × 4 out × (7 weights + bias) ) -> vec4<f32> @@ -53,12 +53,14 @@ fn cnn_conv3x3_7to1( ) -> f32 ``` -**Input normalization (all to [-1,1]):** -- RGBD: `(rgbd - 0.5) * 2` -- UV coords: `(uv - 0.5) * 2` -- Grayscale: `(0.2126*R + 0.7152*G + 0.0722*B - 0.5) * 2` +**Input normalization:** +- **fs_main** normalizes textures once: `(tex - 0.5) * 2` → [-1,1] +- **Conv functions** normalize UV coords: `(uv - 0.5) * 2` → [-1,1] +- **Grayscale** computed from normalized RGBD: `0.2126*R + 0.7152*G + 0.0722*B` +- **Inter-layer data** stays in [-1,1] (no denormalization) +- **Final output** denormalized for display: `(result + 1.0) * 0.5` → [0,1] -**Activation:** tanh for inner layers, none for final layer +**Activation:** tanh for inner layers (output stays [-1,1]), none for final layer ### Multi-Layer Architecture |
