summaryrefslogtreecommitdiff
path: root/cnn_v3/docs/gen_architecture_png.py
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-03-26 07:03:01 +0100
committerskal <pascal.massimino@gmail.com>2026-03-26 07:03:01 +0100
commit8f14bdd66cb002b2f89265b2a578ad93249089c9 (patch)
tree2ccdb3939b673ebc3a5df429160631240239cee2 /cnn_v3/docs/gen_architecture_png.py
parent4ca498277b033ae10134045dae9c8c249a8d2b2b (diff)
feat(cnn_v3): upgrade architecture to enc_channels=[8,16]
Double encoder capacity: enc0 4→8ch, enc1 8→16ch, bottleneck 16→16ch, dec1 32→8ch, dec0 16→4ch. Total weights 2476→7828 f16 (~15.3 KB). FiLM MLP output 40→72 params (L1: 16×40→16×72). 16-ch textures split into _lo/_hi rgba32uint pairs (enc1, bottleneck). enc0 and dec1 textures changed from rgba16float to rgba32uint (8ch). GBUF_RGBA32UINT node gains CopySrc for parity test readback. - WGSL shaders: all 5 passes rewritten for new channel counts - C++ CNNv3Effect: new weight offsets/sizes, 8ch uniform structs - Web tool (shaders.js + tester.js): matching texture formats and bindings - Parity test: readback_rgba32uint_8ch helper, updated vector counts - Training scripts: default enc_channels=[8,16], updated docstrings - Docs + architecture PNG regenerated handoff(Gemini): CNN v3 [8,16] upgrade complete. All code, tests, web tool, training scripts, and docs updated. Next: run training pass.
Diffstat (limited to 'cnn_v3/docs/gen_architecture_png.py')
-rw-r--r--cnn_v3/docs/gen_architecture_png.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/cnn_v3/docs/gen_architecture_png.py b/cnn_v3/docs/gen_architecture_png.py
index bd60a97..1c2ff65 100644
--- a/cnn_v3/docs/gen_architecture_png.py
+++ b/cnn_v3/docs/gen_architecture_png.py
@@ -108,20 +108,20 @@ def dim_label(x, y, txt):
box(EX, Y_IN, BW, BH_IO, C_IO, 'G-Buffer Features',
'20 channels · full res')
-box(EX, Y_E0, BW, BH, C_ENC, 'enc0 Conv(20→4, 3×3) + FiLM + ReLU',
- 'full res · 4 ch')
+box(EX, Y_E0, BW, BH, C_ENC, 'enc0 Conv(20→8, 3×3) + FiLM + ReLU',
+ 'full res · 8 ch')
-box(EX, Y_E1, BW, BH, C_ENC, 'enc1 Conv(4→8, 3×3) + FiLM + ReLU',
- '½ res · 8 ch · (AvgPool↓ on input)')
+box(EX, Y_E1, BW, BH, C_ENC, 'enc1 Conv(8→16, 3×3) + FiLM + ReLU',
+ '½ res · 16 ch · (AvgPool↓ on input)')
box(BX, Y_BN, BW_BN, BH_BN, C_BN,
- 'bottleneck Conv(8→8, 3×3, dilation=2) + ReLU',
- '¼ res · 8 ch · no FiLM · effective RF ≈ 10 px @ ½res')
+ 'bottleneck Conv(16→16, 3×3, dilation=2) + ReLU',
+ '¼ res · 16 ch · no FiLM · effective RF ≈ 10 px @ ½res')
-box(DX, Y_D1, BW, BH, C_DEC, 'dec1 Conv(16→4, 3×3) + FiLM + ReLU',
- '½ res · 4 ch · (upsample↑ + cat enc1 skip)')
+box(DX, Y_D1, BW, BH, C_DEC, 'dec1 Conv(32→8, 3×3) + FiLM + ReLU',
+ '½ res · 8 ch · (upsample↑ + cat enc1 skip)')
-box(DX, Y_D0, BW, BH, C_DEC, 'dec0 Conv(8→4, 3×3) + FiLM + sigmoid',
+box(DX, Y_D0, BW, BH, C_DEC, 'dec0 Conv(16→4, 3×3) + FiLM + sigmoid',
'full res · 4 ch · (upsample↑ + cat enc0 skip)')
box(DX, Y_OUT, BW, BH_IO, C_IO, 'RGBA Output',