diff options
Diffstat (limited to 'scripts/train_cnn_v2_full.sh')
| -rwxr-xr-x | scripts/train_cnn_v2_full.sh | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/scripts/train_cnn_v2_full.sh b/scripts/train_cnn_v2_full.sh index b3ece8a..fc9355a 100755 --- a/scripts/train_cnn_v2_full.sh +++ b/scripts/train_cnn_v2_full.sh @@ -1,7 +1,18 @@ #!/bin/bash # Complete CNN v2 Training Pipeline # Train → Export → Build → Validate -# Usage: ./train_cnn_v2_full.sh [--validate [checkpoint.pth]] +# Usage: ./train_cnn_v2_full.sh [OPTIONS] +# +# OPTIONS: +# (none) Run complete pipeline: train → export → build → validate +# --validate Validate only (skip training, use existing weights) +# --validate CHECKPOINT Validate with specific checkpoint file +# --help Show this help message +# +# Examples: +# ./train_cnn_v2_full.sh +# ./train_cnn_v2_full.sh --validate +# ./train_cnn_v2_full.sh --validate checkpoints/checkpoint_epoch_50.pth set -e @@ -12,6 +23,11 @@ cd "$PROJECT_ROOT" VALIDATE_ONLY=false VALIDATE_CHECKPOINT="" +if [ "$1" = "--help" ] || [ "$1" = "-h" ]; then + head -20 "$0" | grep "^#" | grep -v "^#!/" | sed 's/^# *//' + exit 0 +fi + if [ "$1" = "--validate" ]; then VALIDATE_ONLY=true if [ -n "$2" ]; then |
