Development
#ai
pytorch-training
Best practices for building robust PyTorch training loops. Use when generating or reviewing ML training code.
DeepseekModel
Curated skill
Quality Excellent · 90
v1.0.0
Get
https://deepseekmodel.com/api/download.php?id=aiming-lab-autoresearchclaw-researchclaw-skills-builtin-tooling-pytorch-training-skill-md&format=skill
Download .skill
Standard format with system_prompt and model_config, ready for any agent framework
The actual content of the system_prompt field in the .skill file.
name pytorch-training description Best practices for building robust PyTorch training loops. Use when generating or reviewing ML training code. metadata {"category":"tooling","trigger-keywords":"training,pytorch,torch,deep learning,neural network,model","applicable-stages":"10,12","priority":"3","version":"1.0","author":"researchclaw","references":"PyTorch Performance Tuning Guide, pytorch.org","code-template":"import torch\nimport torch.nn as nn\nfrom torch.utils.data import DataLoader\n\n# Reproducibility\ntorch.manual_seed(seed)\ntorch.cuda.manual_seed_all(seed)\ntorch.backends.cudnn.deterministic = True\n\n# Training loop\nmodel.train()\nfor epoch in range(num_epochs):\n for batch in train_loader:\n optimizer.zero_grad(set_to_none=True)\n loss = criterion(model(batch['input']), batch['target'])\n loss.backward()\n torch.nn.utils.clip_grad_norm_(model.parameters(), max_norm=1.0)\n optimizer.step()\n scheduler.step()\n"} PyTorch Training Best Practice Use torch.manual_seed() for reproducibility (set for torch, numpy, random) Use DataLoader with num_workers>0 and pin_memory=True for GPU Enable cudnn.benchmark=True for fixed input sizes Use learning rate schedulers (CosineAnnealingLR or OneCycleLR) Implement early stopping based on validation metric Log metrics every epoch, save best model checkpoint Use torch.no_grad() for evaluation Clear gradients with optimizer.zero_grad(set_to_none=True) for efficiency
Keywords that activate this skill. Click one to copy it.
This skill does not provide trigger words.
The downloaded .skill package contains the following fields.
| Field | Description |
|---|---|
| format | Format tag (skill/v1) |
| skill_id | Unique skill ID |
| name | Skill name |
| version | Version |
| description | Description |
| category | Categories (array) |
| trigger_words | Trigger words |
| tags | Tags |
| source | Source |
| source_url | Source URL (this page) |
| exported_at | Exported at (set per download) |
| system_prompt | System prompt body |
| model_config | Model config: provider / model / temperature / max_tokens / top_p |
| examples | Examples |
| install_guide | Import guide for Coze / Dify / Claude / custom frameworks |
The same skill can be exported in different platform formats.