| Age | Commit message (Collapse) | Author |
|
architecture PNG
- Replace 1×1 pointwise bottleneck with Conv(8→8, 3×3, dilation=2):
effective RF grows from ~13px to ~29px at ¼res (~+1 KB weights)
- Add Sobel edge loss in training (--edge-loss-weight, default 0.1)
- Add FiLM 2-phase training: freeze MLP for warmup epochs then
unfreeze at lr×0.1 (--film-warmup-epochs, default 50)
- Update weight layout: BN 72→584 f16, total 1964→2476 f16 (4952 B)
- Cascade offsets in C++ effect, JS tool, export/gen_test_vectors scripts
- Regenerate test_vectors.h (1238 u32); parity max_err=9.77e-04
- Generate dark-theme U-Net+FiLM architecture PNG (gen_architecture_png.py)
- Replace ASCII art in CNN_V3.md and HOW_TO_CNN.md with PNG embed
handoff(Gemini): bottleneck dilation + Sobel loss + FiLM warmup landed.
Next: run first real training pass (see cnn_v3/docs/HOWTO.md §3).
|
|
C++:
- cnn_v3_effect.cc: fix declare_nodes comment (output node declared by caller)
- cnn_v3_effect.cc: add TODO(phase-7) marker for FiLM MLP replacement
WGSL:
- cnn_v3_bottleneck.wgsl: consolidate _pad fields onto one line, explain why
array<u32,3> is invalid in uniform address space
- cnn_v3_enc0.wgsl: fix "12xu8" → "12ch u8norm" in header comment
- cnn_v3_dec0.wgsl: clarify parity note (sigmoid after FiLM+ReLU, not raw conv)
- cnn_v3_common.wgsl: clarify unpack_8ch pack layout (low/high 16 bits)
Python:
- cnn_v3_utils.py: replace PIL-based _upsample_nearest (uint8 round-trip) with
pure numpy index arithmetic; rename _resize_rgb → _resize_img (handles any
channel count); add comment on normal zero-pad workaround
- export_cnn_v3_weights.py: add cross-ref to cnn_v3_effect.cc constants;
clarify weight count comments with Conv notation
Test:
- test_cnn_v3_parity.cc: enc0/dec1 layer failures now return 0 (were print-only)
handoff(Gemini): CNN v3 review complete, 36/36 tests passing.
|
|
5 compute shaders + cnn_v3/common snippet:
enc0: Conv(20→4,3×3) + FiLM + ReLU full-res
enc1: AvgPool + Conv(4→8,3×3) + FiLM + ReLU half-res
bottleneck: AvgPool + Conv(8→8,1×1) + ReLU quarter-res
dec1: NearestUp + cat(enc1) + Conv(16→4) + FiLM half-res
dec0: NearestUp + cat(enc0) + Conv(8→4) + FiLM + Sigmoid full-res
Parity rules: zero-pad conv, AvgPool down, NearestUp, FiLM after
conv+bias, skip=concat, OIHW weights+bias layout. Matches PyTorch
train_cnn_v3.py forward() exactly.
Registered in workspaces/main/assets.txt + src/effects/shaders.cc.
Weight layout + Params struct documented in cnn_v3/docs/HOWTO.md §7.
Next: Phase 4 — C++ CNNv3Effect + FiLM uniform upload.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|