executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
training-evaluationUse segmentation_models_pytorch losses, metrics, tensor modes, and safe training/evaluation loops for segmentation.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this sub-skill when an agent needs to train or evaluate segmentation with segmentation_models_pytorch (SMP) losses and metrics, diagnose mask/logit shape errors, or adapt a short training loop without downloads or long-running training.
DiceLoss, JaccardLoss, TverskyLoss, FocalLoss, LovaszLoss, SoftBCEWithLogitsLoss, SoftCrossEntropyLoss, or MCCLoss.BINARY_MODE, MULTICLASS_MODE, and MULTILABEL_MODE for logits, masks, losses, and metrics.smp.metrics.get_stats followed by iou_score, f1_score, accuracy, precision, or recall.from_logits, ignore_index, or class_weights failures.classes, in_channels, decoder options, or smp.create_model in model-building.(N, 1, H, W) and target masks are 0/1, preferably (N, 1, H, W) for metrics and either (N, H, W) or (N, 1, H, W) for most losses.(N, C, H, W), target is integer class ids (N, H, W), and classes are mutually exclusive.(N, C, H, W), each channel is an independent 0/1 label, and classes may overlap.from_logits=True; metrics consume hard integer masks or floating binary/multilabel scores plus a threshold.Run the bundled validator before changing a real loop:
python sub-skills/training-evaluation/scripts/validate_training_shapes.py --mode binary --batch 2 --classes 1 --height 8 --width 8 --from-logits --metric-threshold 0.5
python sub-skills/training-evaluation/scripts/validate_training_shapes.py --mode multiclass --classes 3 --loss soft-ce
python sub-skills/training-evaluation/scripts/validate_training_shapes.py --mode multilabel --classes 4 --metric-threshold 0.5
The helper constructs tiny tensors only; it does not download data, build a model, or train.