From 064ebb52847949d62f81873f5e44f12bca4d2e60 Mon Sep 17 00:00:00 2001 From: skal Date: Fri, 13 Feb 2026 08:24:36 +0100 Subject: Add weights/ subdirectory to workspaces for CNN training outputs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Each workspace now has a weights/ directory to store binary weight files from CNN training (e.g., cnn_v2_weights.bin). Changes: - Created workspaces/{main,test}/weights/ - Moved cnn_v2_weights.bin → workspaces/main/weights/ - Updated assets.txt reference - Updated training scripts and export tool paths handoff(Claude): Workspace weights/ directories added --- scripts/train_cnn_v2_full.sh | 4 ++-- training/export_cnn_v2_weights.py | 2 +- workspaces/main/assets.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/train_cnn_v2_full.sh b/scripts/train_cnn_v2_full.sh index d6ddbe2..db55a8b 100755 --- a/scripts/train_cnn_v2_full.sh +++ b/scripts/train_cnn_v2_full.sh @@ -155,7 +155,7 @@ echo " Using checkpoint: $FINAL_CHECKPOINT" # Export weights only if not in validate mode if [ "$VALIDATE_ONLY" = false ]; then python3 training/export_cnn_v2_weights.py "$FINAL_CHECKPOINT" \ - --output-weights workspaces/main/cnn_v2_weights.bin > /dev/null 2>&1 + --output-weights workspaces/main/weights/cnn_v2_weights.bin > /dev/null 2>&1 fi # Build cnn_test @@ -183,7 +183,7 @@ echo "" echo "Results:" if [ "$VALIDATE_ONLY" = false ]; then echo " - Checkpoints: $CHECKPOINT_DIR" - echo " - Final weights: workspaces/main/cnn_v2_weights.bin" + echo " - Final weights: workspaces/main/weights/cnn_v2_weights.bin" fi echo " - Validation outputs: $VALIDATION_DIR" echo "" diff --git a/training/export_cnn_v2_weights.py b/training/export_cnn_v2_weights.py index d8c7c10..8a2fcdc 100755 --- a/training/export_cnn_v2_weights.py +++ b/training/export_cnn_v2_weights.py @@ -256,7 +256,7 @@ fn main(@builtin(global_invocation_id) id: vec3) { def main(): parser = argparse.ArgumentParser(description='Export CNN v2 weights to binary format') parser.add_argument('checkpoint', type=str, help='Path to checkpoint .pth file') - parser.add_argument('--output-weights', type=str, default='workspaces/main/cnn_v2_weights.bin', + parser.add_argument('--output-weights', type=str, default='workspaces/main/weights/cnn_v2_weights.bin', help='Output binary weights file') parser.add_argument('--output-shader', type=str, default='workspaces/main/shaders', help='Output directory for shader template') diff --git a/workspaces/main/assets.txt b/workspaces/main/assets.txt index 3ca0ace..e575b41 100644 --- a/workspaces/main/assets.txt +++ b/workspaces/main/assets.txt @@ -45,7 +45,7 @@ SHADER_CNN_WEIGHTS, NONE, shaders/cnn/cnn_weights_generated.wgsl, "CNN Weights ( SHADER_CNN_LAYER, NONE, shaders/cnn/cnn_layer.wgsl, "CNN Layer Shader" SHADER_CNN_V2_STATIC, NONE, shaders/cnn_v2/cnn_v2_static.wgsl, "CNN v2 Static Features" SHADER_CNN_V2_COMPUTE, NONE, shaders/cnn_v2/cnn_v2_compute.wgsl, "CNN v2 Compute (Storage Buffer)" -WEIGHTS_CNN_V2, NONE, cnn_v2_weights.bin, "CNN v2 Binary Weights" +WEIGHTS_CNN_V2, NONE, weights/cnn_v2_weights.bin, "CNN v2 Binary Weights" SHADER_SOLARIZE, NONE, shaders/solarize.wgsl, "Solarize Shader" SHADER_DISTORT, NONE, shaders/distort.wgsl, "Distort Shader" SHADER_CHROMA_ABERRATION, NONE, shaders/chroma_aberration.wgsl, "Chroma Aberration Shader" -- cgit v1.2.3