| Age | Commit message (Collapse) | Author |
|
Two bugs blocking training convergence:
1. dec0 ReLU before sigmoid constrained output to [0.5,1.0] — network
could never produce dark pixels. Removed F.relu in train_cnn_v3.py
and max(0,…) in cnn_v3_dec0.wgsl. Test vectors regenerated.
2. set_film_params() used hardcoded heuristics instead of the trained MLP.
Added CNNv3FilmMlp struct + load_film_mlp() to cnn_v3_effect.h/.cc.
MLP auto-loaded from ASSET_WEIGHTS_CNN_V3_FILM_MLP at construction;
Linear(5→16)→ReLU→Linear(16→72) runs CPU-side each frame.
36/36 tests pass. Parity max_err=4.88e-4 unchanged.
handoff(Gemini): retrain from scratch — needs ≥50 samples (currently 11).
See cnn_v3/docs/HOWTO.md §2-3.
|
|
|
|
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.
|
|
|
|
|
|
- CNNv3Effect constructor loads ASSET_WEIGHTS_CNN_V3 via GetAsset on startup
- seq_compiler.py: CLASS_TO_HEADER supports full #include paths for cnn_v3/ classes
- timeline.seq: add cnn_v3_test sequence at 48s (GBufferEffect → CNNv3Effect)
- test_cnn_v3_parity: zero_weights test now explicitly uploads zeros to override asset
handoff(Gemini): CNNv3Effect ready; export weights to workspaces/main/weights/ and seek to 48s to test
|
|
Updated gen_identity_weights.py --mix mode to use static features
p4-p7 (uv_x, uv_y, sin20_y, bias) at channels 8-11 instead of
p0-p3 (RGB+D) at channels 4-7.
Before: 0.5*prev[i] + 0.5*static_p{i} (channels 4-7)
After: 0.5*prev[i] + 0.5*static_p{4+i} (channels 8-11)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|