Neural Network Builder Skill for Classifier Tensor Shapes
Design a tiny classifier and verify logits, label types, and a training step before using a larger fixture.
中文Install in Claude Code
Use Python, PyTorch, and synthetic two-dimensional points with three class labels.
- Get the complete `plugins/ai-ml/neural-network-builder/skills/building-neural-networks` directory from the pinned GitHub commit.
- Copy it into the target project's `.claude/skills/`. Check `.claude/skills/building-neural-networks/SKILL.md`, start Claude Code at the project root, and call `/building-neural-networks`.
Example task
Build a 2 to 8 to 3 network. Run four examples with labels 0, 1, 2, and 1, inspect logits shape, and perform one training step.What to check
Logits have shape (4,3), loss is finite, and gradients support the update.
Original SKILL.md on GitHub · Updated
Frequently asked question
Should I apply softmax before PyTorch CrossEntropyLoss?
Pass unnormalized logits as the loss expects. Compute softmax separately when you need displayed probabilities.