model-training
БесплатноБез исполняемых скриптовНе проверенConfigure, preflight, run, resume, and troubleshoot DeepDanbooru 1.0.0 model training with a CPU-first TensorFlow workflow.
от lza6★ 19 звёзд на GitHubОб этом скилле
Model training
Use this sub-skill after a DeepDanbooru project and Danbooru-style dataset exist. It covers configuration, a read-only preflight, training dispatch, checkpoint resume, and saved-model artifacts for DeepDanbooru 1.0.0.
CPU TensorFlow is the required verified backend. GPU execution is optional and unverified; never infer GPU readiness from device discovery or a CPU success. Full training is intentionally skip-expensive during skill verification: the ResNet variants, image pipeline, multiple epochs, checkpoint I/O, and model exports can consume substantial compute, memory, and storage. Verify structure and a bounded data sample first, then launch training only with an explicit runtime and resource decision.
Route the request
| Need | Read or run |
|---|---|
Create project.json, tags.txt, or the SQLite/image layout |
project-data-setup |
| Validate configuration values without training | validate_project_config.py |
| Validate config, tags, SQLite rows, image paths, checkpoints, and packages | training_preflight.py |
| Start, resume, or initialize from a saved model | Training workflows |
| Understand row selection, image paths, labels, and augmentation | Training data pipeline |
| Choose a model, optimizer, loss, schedule, or precision policy | Model and loss reference |
| Diagnose empty runs, missing images, unsupported values, or resume surprises | Troubleshooting |
| Evaluate the resulting Keras model | inference-evaluation |
| Convert to TFLite or create Grad-CAM output | post-training-tools |
Supported dispatch values
Use these exact lowercase strings in project.json:
- Models:
resnet_152,resnet_custom_v1,resnet_custom_v2,resnet_custom_v3,resnet_custom_v4. - Optimizers:
adam,sgd,rmsprop. - Losses:
binary_crossentropy,focal_loss.
Any other value fails before training. The default project uses
resnet_custom_v2, adam, binary_crossentropy, and an image shape of
299 by 299 with three channels. Shape order in the model is
(image_height, image_width, 3) even though the JSON fields list width and
height separately.
Safe preflight
From this sub-skill directory, run:
python scripts/validate_project_config.py PROJECT --check-paths
python scripts/training_preflight.py PROJECT --check-packages
Both helpers are read-only, deterministic, offline, and use the standard library for configuration, filesystem, tag, and SQLite checks. They do not launch training. Package and TensorFlow import probes are opt-in so basic validation still works when optional runtime packages are absent.
The preflight checks a bounded, ID-ordered image sample by default. Use
--max-image-checks 0 only when a complete filesystem scan is intended and its
I/O cost is acceptable. Use --probe-imports --probe-tensorflow to test the
installed modules and confirm that TensorFlow exposes a CPU; this still does
not train or verify a GPU.
Do not launch training unless all of these hold:
project.jsonparses and all dispatch values and numeric ranges are valid.tags.txtis non-empty and is the intended fixed output vocabulary.- The SQLite
poststable has the required columns and at least one eligible row atminimum_tag_count. - Derived image paths exist for the checked rows, and the image format is actually decodable by the training environment.
- Checkpoint state is understood: an existing latest checkpoint causes an automatic resume.
- The CPU TensorFlow environment can import DeepDanbooru, TensorFlow, and TensorFlow I/O.
Launch boundary
The side-effecting command is:
deepdanbooru train-project PROJECT_PATH
To load initial weights/model structure from an existing saved model:
deepdanbooru train-project PROJECT_PATH --source-model MODEL.keras
--source-model is not a no-resume flag. After the model is loaded, any latest
checkpoint under PROJECT_PATH/checkpoints/ is restored and can supersede its
state. Preserve or deliberately relocate checkpoints before changing training
lineage. Also confirm source-model input/output compatibility with the image
shape and number of tags; the training function does not perform a friendly
compatibility check.
Runtime behavior to preserve
Training compiles with precision and recall metrics, shuffles records once per
epoch from a checkpointed seed, applies an optional epoch learning-rate
schedule, trains in checkpoint-sized slices, and saves after each slice.
Checkpoint state includes optimizer/model variables plus used_epoch,
used_minibatch, used_sample, offset, and random_seed; only the latest
three chec
Установить model-training в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл model-training?
Configure, preflight, run, resume, and troubleshoot DeepDanbooru 1.0.0 model training with a CPU-first TensorFlow workflow.
Как установить скилл model-training?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл model-training запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic