diff options
| author | skal <pascal.massimino@gmail.com> | 2026-03-21 09:51:58 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-03-21 09:51:58 +0100 |
| commit | 673a24215b2670007317060325256059d1448f3b (patch) | |
| tree | bfb2cf37a93eb62055bcca8441d9b15c3533e17c /cnn_v3/src/cnn_v3_effect.h | |
| parent | b8b2707d7b3f2eaabd896395f2625e13405a24e2 (diff) | |
feat(cnn_v3): Phase 5 complete — parity validation passing (36/36 tests)
- Add test_cnn_v3_parity.cc: zero_weights + random_weights tests
- Add gen_test_vectors.py: PyTorch reference implementation for enc0/enc1/bn/dec1/dec0
- Add test_vectors.h: generated C header with enc0, dec1, output expected values
- Fix declare_nodes(): intermediate textures at fractional resolutions (W/2, W/4)
using new NodeRegistry::default_width()/default_height() getters
- Add layer-by-layer readback (enc0, dec1) for regression coverage
- Final parity: enc0 max_err=1.95e-3, dec1 max_err=1.95e-3, out max_err=4.88e-4
handoff(Claude): CNN v3 parity done. Next: train_cnn_v3.py (FiLM MLP training).
Diffstat (limited to 'cnn_v3/src/cnn_v3_effect.h')
| -rw-r--r-- | cnn_v3/src/cnn_v3_effect.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cnn_v3/src/cnn_v3_effect.h b/cnn_v3/src/cnn_v3_effect.h index c358990..36e2797 100644 --- a/cnn_v3/src/cnn_v3_effect.h +++ b/cnn_v3/src/cnn_v3_effect.h @@ -89,6 +89,10 @@ class CNNv3Effect : public Effect { // Update FiLM conditioning; call before render() each frame. void set_film_params(const CNNv3FiLMParams& fp); + // Upload packed-f16 weights (kWeightsBufBytes bytes of u32 pairs). + // Used for testing and inference from trained .bin files. + void upload_weights(WGPUQueue queue, const void* data, uint32_t size_bytes); + private: // Intermediate node names (prefixed from output[0]) std::string node_enc0_; |
