summaryrefslogtreecommitdiff
path: root/doc/HOWTO.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/HOWTO.md')
-rw-r--r--doc/HOWTO.md24
1 files changed, 23 insertions, 1 deletions
diff --git a/doc/HOWTO.md b/doc/HOWTO.md
index bdc0214..5ea6afd 100644
--- a/doc/HOWTO.md
+++ b/doc/HOWTO.md
@@ -86,12 +86,34 @@ make run_util_tests # Utility tests
---
+## Training
+
+```bash
+./training/train_cnn.py --layers 3 --kernel_sizes 3,5,3 --epochs 10000 --batch_size 8 --input training/input/ --target training/output/ --checkpoint-every 1000
+```
+
+Generate shaders from checkpoint:
+```bash
+./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)
+
+---
+
## Timeline
Edit `workspaces/main/timeline.seq`:
```text
SEQUENCE 0.0 0
- EFFECT HeptagonEffect 0.0 60.0 0
+ EFFECT + HeptagonEffect 0.0 60.0 0
```
Rebuild to apply. See `doc/SEQUENCE.md`.