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-summary-usageUse torchsummary.summary and torchsummary.summary_string to inspect PyTorch nn.Module shapes, parameter counts, devices, dtypes, and memory estimates.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this sub-skill when a task needs to call torchsummary.summary or
torchsummary.summary_string for a PyTorch nn.Module without reopening the
source repository.
summary_string.torchinfo for a newer or more advanced model-inspection task.torchinfo or a PyTorch profiler workflow for those cases.Confirm the runtime has torchsummary, torch, and numpy available.
Import only the public API:
from torchsummary import summary, summary_string
For CPU-safe usage, pass the device explicitly and move the model yourself:
import torch
device = torch.device("cpu")
model = model.to(device)
summary(model, input_size=(channels, height, width), device=device)
Use the bundled smoke helper from this sub-skill directory when you need a quick verification of the installed package:
python scripts/smoke_summary.py --help
python scripts/smoke_summary.py --case all --device cpu
From the root generated skill directory, use:
python sub-skills/model-summary-usage/scripts/smoke_summary.py --case all --device cpu
input_size, batch_size, device, dtype, hook, and memory-estimate semantics.summary_string, and output-interpretation recipes.torchsummary; version evidenced for this skill:
1.5.1.summary and summary_string from torchsummary.summary(...) prints the formatted table and returns the parameter-info tuple
produced by summary_string(...).summary_string(...) returns (summary_str, (total_params, trainable_params)).input_size excludes the batch dimension. A tuple means one input; a list of
tuples means multiple inputs.cuda:0), so CPU-only calls should pass
device="cpu" or torch.device("cpu").