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
model-inferenceSelect, prepare, and run verified Gluon or PyTorch/pytorchcv image-classification models with safe CPU defaults, strict local checkpoints, ImageNet preprocessing, and output checks.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this skill for one-batch image-classification inference, model selection, local checkpoint loading, input preprocessing, or lightweight model statistics through the Gluon or PyTorch/pytorchcv providers.
Start from the sub-skill directory with a non-pretrained resnet18 CPU smoke:
python scripts/infer_gluon.py --model resnet18
python scripts/infer_pytorch.py --model resnet18
Both scripts construct random weights by passing pretrained=False, use one
normalized (1, 3, 224, 224) input, and print the output shape, parameter count,
and zero-based top-k class indices/probabilities. If --image is omitted, the
input is a zero-valued RGB image before normalization, so the result is only a
shape/device smoke and has no accuracy meaning.
The scripts never request or download pretrained weights. A checkpoint is
accepted only as an existing local file; use --checkpoint FILE with the same
provider, model, class count, and input-channel count used to create it. The
PyTorch script also accepts --remove-module for a checkpoint saved under
torch.nn.DataParallel.
ValueError for an unsupported model; they do not infer aliases.pretrained=False for smoke tests. If using --checkpoint, keep the
model and --classes aligned with the checkpoint and let strict loading
expose missing, extra, or shape-incompatible parameters.Do not turn this route into training, resume, or dataset evaluation. Send those requests to training-evaluation. Send cross-framework parameter conversion to conversion. Send TensorFlow, Keras, and Chainer requests to framework-compatibility.