Skills Plugins MCP Prompt Model 博客 我的中心

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
formatFormat tag (skill/v1)
skill_idUnique skill ID
nameSkill name
versionVersion
descriptionDescription
categoryCategories (array)
trigger_wordsTrigger words
tagsTags
sourceSource
source_urlSource URL (this page)
exported_atExported at (set per download)
system_promptSystem prompt body
model_configModel config: provider / model / temperature / max_tokens / top_p
examplesExamples
install_guideImport guide for Coze / Dify / Claude / custom frameworks
The same skill can be exported in different platform formats.
.skill Standard format with system_prompt and model_config, ready for any agent framework Download
.skillpro Enhanced format with scripts, tools, dependencies and hooks Download
.json Plain JSON export with system_prompt and model parameters only Download
Coze Markdown with frontmatter, for Coze platform import Download
Dify Dify DSL, import directly after creating an app Download

每日精选 Skill 推荐,免费送到你邮箱

输入邮箱,每天接收一个精选 AI Agent 技能推荐。完全免费,持续更新。

提交后我们会发送一封确认邮件,点击邮件里的链接才会开始收信。

完全免费,取消任意时间。我们不会发送垃圾邮件。