Agent skill

pytorch-training

Best practices for building robust PyTorch training loops. Use when generating or reviewing ML training code.

Stars 11,027
Forks 1,262

Install this agent skill to your Project

npx add-skill https://github.com/aiming-lab/AutoResearchClaw/tree/main/researchclaw/skills/builtin/tooling/pytorch-training

Metadata

Additional technical details for this skill

author
researchclaw
version
1.0
category
tooling
priority
3
references
PyTorch Performance Tuning Guide, pytorch.org
code template
import torch import torch.nn as nn from torch.utils.data import DataLoader # Reproducibility torch.manual_seed(seed) torch.cuda.manual_seed_all(seed) torch.backends.cudnn.deterministic = True # Training loop model.train() for epoch in range(num_epochs): for batch in train_loader: optimizer.zero_grad(set_to_none=True) loss = criterion(model(batch['input']), batch['target']) loss.backward() torch.nn.utils.clip_grad_norm_(model.parameters(), max_norm=1.0) optimizer.step() scheduler.step()
trigger keywords
training,pytorch,torch,deep learning,neural network,model
applicable stages
10,12

SKILL.md

PyTorch Training Best Practice

  1. Use torch.manual_seed() for reproducibility (set for torch, numpy, random)
  2. Use DataLoader with num_workers>0 and pin_memory=True for GPU
  3. Enable cudnn.benchmark=True for fixed input sizes
  4. Use learning rate schedulers (CosineAnnealingLR or OneCycleLR)
  5. Implement early stopping based on validation metric
  6. Log metrics every epoch, save best model checkpoint
  7. Use torch.no_grad() for evaluation
  8. Clear gradients with optimizer.zero_grad(set_to_none=True) for efficiency

Expand your agent's capabilities with these related and highly-rated skills.

aiming-lab/AutoResearchClaw

scientific-visualization

Publication-ready scientific figure design with matplotlib and seaborn. Use when creating journal submission figures with proper formatting, accessibility, and statistical annotations.

11,027 1,262
Explore
aiming-lab/AutoResearchClaw

hypothesis-formulation

Structured scientific hypothesis generation from observations. Use when formulating testable hypotheses, competing explanations, or experimental predictions.

11,027 1,262
Explore
aiming-lab/AutoResearchClaw

scientific-writing

Academic manuscript writing with IMRAD structure, citation formatting, and reporting guidelines. Use when drafting or revising research papers.

11,027 1,262
Explore
aiming-lab/AutoResearchClaw

a-evolve

Apply A-Evolve's agentic evolution methodology to improve AI agent performance across runs. Use when the user wants to diagnose agent failures, generate targeted skills from error patterns, evolve system prompts, or accumulate episodic knowledge. Works standalone or inside AutoResearchClaw pipelines. Triggers on: "evolve", "self-improve", "diagnose failures", "generate skills from errors", "what went wrong and how to fix it", or any mention of A-Evolve.

11,027 1,262
Explore
aiming-lab/AutoResearchClaw

chemistry-rdkit

Computational chemistry with RDKit for molecular analysis, descriptors, fingerprints, and substructure search. Use when working with SMILES, drug discovery, or cheminformatics tasks.

11,027 1,262
Explore
aiming-lab/AutoResearchClaw

literature-search

Systematic literature review methodology including search strategy, screening, and synthesis. Use when conducting literature reviews or writing background sections.

11,027 1,262
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results