Skip to main content
Run any Skill in Manus
with one click

pytorch-patterns

Stars2
Forks0
UpdatedJuly 9, 2026 at 00:38

Idiomatic PyTorch for robust, reproducible, memory-conscious training pipelines: device-agnostic placement, full seed control, explicit tensor shape tracking, clean nn.Module construction, weight initialisation, correct train/eval mode discipline, the standard training and validation loops, efficient Dataset/DataLoader configuration, variable-length collation, resumable checkpointing, and the performance levers (mixed precision, gradient checkpointing, torch.compile). Front-loads the autograd- and correctness-breaking anti-patterns: forgetting eval() at validation, in-place ops severing the graph, .item() before backward, moving the model to GPU inside the loop, and the pickle-RCE risk of loading checkpoints without weights_only. Use when writing or reviewing models, training scripts, or data pipelines, or when tuning GPU memory and speed.

Installation

Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.

SKILL.md
readonly