diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-10 20:05:37 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-10 20:05:37 +0100 |
| commit | bbef66d114ddd8091f79c8b27e6877c80236031b (patch) | |
| tree | a881e60548494d2d7e2bb424313d87c7a4ce0a4c /doc | |
| parent | 0d5775a2295ed9323330ecf577c7927c8d4b65e8 (diff) | |
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/CNN_EFFECT.md | 8 | ||||
| -rw-r--r-- | doc/HOWTO.md | 5 |
2 files changed, 13 insertions, 0 deletions
diff --git a/doc/CNN_EFFECT.md b/doc/CNN_EFFECT.md index d51c187..4659fd3 100644 --- a/doc/CNN_EFFECT.md +++ b/doc/CNN_EFFECT.md @@ -151,6 +151,14 @@ python3 training/train_cnn.py \ --output workspaces/main/shaders/cnn/cnn_weights_generated.wgsl ``` +**Generate ground truth (for shader validation):** +```bash +python3 training/train_cnn.py \ + --infer training/input/img_000.png \ + --export-only training/checkpoints/checkpoint_epoch_200.pth \ + --output training/ground_truth.png +``` + ### 3. Rebuild Demo Training script auto-generates both `cnn_weights_generated.wgsl` and `cnn_layer.wgsl`: diff --git a/doc/HOWTO.md b/doc/HOWTO.md index a57a161..5ea6afd 100644 --- a/doc/HOWTO.md +++ b/doc/HOWTO.md @@ -97,6 +97,11 @@ Generate shaders from checkpoint: ./training/train_cnn.py --export-only training/checkpoints/checkpoint_epoch_7000.pth ``` +Generate ground truth (for shader validation): +```bash +./training/train_cnn.py --infer input.png --export-only checkpoints/checkpoint_epoch_7000.pth --output ground_truth.png +``` + **Note:** Kernel sizes must match shader functions: - 3×3 kernel → `cnn_conv3x3_7to4` (36 weights: 9 pos × 4 channels) - 5×5 kernel → `cnn_conv5x5_7to4` (100 weights: 25 pos × 4 channels) |
