界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
数据与研究 · SKILL.md

training

training

【数据与研究】Guides tensorflow-yolov3 YOLOv3 training setup, custom datasets, COCO-initialized weights, cfg.TRAIN/cfg.YOLO edits, logs, checkpoints, NaN fixes, and GPU/TF1 prerequisites.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: training description: "Guides tensorflow-yolov3 YOLOv3 training setup, custom datasets, COCO-initialized weights, cfg.TRAIN/cfg.YOLO edits, logs, checkpoints, NaN fixes, and GPU/TF1 prerequisites." disable-model-invocation: true metadata: disco-role: operating license: NOASSERTION

Training

Use this sub-skill when a user wants to configure or run this repository's YOLOv3 training workflow from scratch or from COCO-initialized weights, adjust cfg.TRAIN/cfg.YOLO, diagnose dataset/class/annotation mismatches, understand losses and checkpoints, or prepare a long TF1 training run.

Before launching python train.py, load these bundled references:

  • Training workflows for from-scratch and COCO-initialized procedures, two-stage training behavior, monitoring, and output files.
  • Training API/config reference for exact cfg.TRAIN, cfg.YOLO, Dataset, and YOLOV3 training contracts.
  • Training troubleshooting for missing checkpoints, custom class-count bugs, NaN losses, path/cwd issues, TF1/GPU compatibility, and data-loader edge cases.
  • Safe config checker to validate paths, class files, anchors, annotation rows, input sizes, and optional checkpoint prefixes without importing TensorFlow or running training.

Operating rules

  1. Treat full training as expensive and state prerequisites first: a TensorFlow 1.x-compatible Python environment, images reachable from the training working directory, writable ./data/log/ and ./checkpoint/, enough GPU/CPU memory for the chosen TRAIN.BATCH_SIZE and multi-scale TRAIN.INPUT_SIZE, and a clear time budget.
  2. Run or recommend the checker before training. For COCO-initialized training, pass --require-checkpoint; for intentional scratch training, omit it and set or tolerate a missing TRAIN.INITIAL_WEIGHT.
  3. Keep core/config.py and dataset files consistent. cfg.YOLO.CLASSES determines num_classes, output-head width, and valid annotation class ids.
  4. Remember the repo's typo: the first-stage epoch field is cfg.TRAIN.FISRT_STAGE_EPOCHS, not FIRST_STAGE_EPOCHS.
  5. Do not imply that CPU-only checks prove throughput or convergence. CPU graph construction can validate APIs, but long training normally needs a compatible GPU stack and real data.

Quick diagnostic command

From the repository root, validate the default training config without running training:

python sub-skills/training/scripts/check_training_config.py \
  --repo-root . \
  --config-py ./core/config.py

For expected COCO-initialized training, require the checkpoint prefix:

python sub-skills/training/scripts/check_training_config.py \
  --repo-root . \
  --config-py ./core/config.py \
  --require-checkpoint
我的收藏