diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-10 21:21:53 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-10 21:21:53 +0100 |
| commit | b25132133590e39967ebd0f3205123ee6628674b (patch) | |
| tree | f2c96c0535183e97e16724ca64180b3f862ea71f /workspaces/test/music.track | |
| parent | 861182bd33cae0b538f2e4beeb5b56e66c8f0ff7 (diff) | |
fix: Add clamp to CNN final layer to match PyTorch training
CNN output mismatch resolved: final layer (7→1) now clamps to [0,1].
Changes:
- Add clamp(sum, 0.0, 1.0) to cnn_conv3x3_7to1 and cnn_conv5x5_7to1
- Add generate_conv_final_function() to train_cnn.py for auto-generation
- Update comments to clarify clamping behavior
- Future exports will auto-generate final layers with correct clamp
PyTorch uses torch.clamp(out, 0.0, 1.0) on final output; shaders
were missing this critical operation, causing range mismatches.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'workspaces/test/music.track')
0 files changed, 0 insertions, 0 deletions
