pytorch-training
Train and optimize deep learning models with PyTorch. Use when building neural networks, implementing training loops, or optimizing model performance.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Train and optimize deep learning models with PyTorch. Use when building neural networks, implementing training loops, or optimizing model performance.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Produce .pptx architecture presentations (title, context, component, sequence, deployment slides) with python-pptx. Use when the user asks for an architecture deck, solution presentation, design review slides, or any .pptx deliverable about a system design.
Produce .docx Solution Architecture Documents (SAD) with python-docx — context, requirements, views, decisions, NFRs. Use when the user asks for an architecture document, solution design document, HLD/LLD, or any .docx deliverable describing a system design.
Author Mermaid diagrams for architecture work — C4 context/container/component, sequence, deployment, flowchart, and state diagrams with copy-paste examples and CLI validation. Use when the user wants a text-based diagram, a diagram embedded in Markdown, or a quick architecture sketch.
Create production-grade frontend interfaces when backend services need admin panels, dashboards, or API documentation UIs. Use when building web interfaces for backend services.
Process multimedia files with FFmpeg and ImageMagick for encoding, conversion, and manipulation. Use when working with video, audio, or image processing pipelines.
Template for creating new skills. Copy this directory and customize for your specific use case.
| name | pytorch-training |
| description | Train and optimize deep learning models with PyTorch. Use when building neural networks, implementing training loops, or optimizing model performance. |
Activate this skill when training deep learning models with PyTorch.
import torch
import torch.nn as nn
from torch.utils.data import DataLoader
model = MyModel().to(device)
optimizer = torch.optim.AdamW(model.parameters(), lr=3e-4)
scheduler = torch.optim.lr_scheduler.CosineAnnealingLR(optimizer, T_max=epochs)
for epoch in range(epochs):
model.train()
for batch in train_loader:
optimizer.zero_grad()
loss = model(batch)
loss.backward()
torch.nn.utils.clip_grad_norm_(model.parameters(), 1.0)
optimizer.step()
scheduler.step()
torch.no_grad() during evaluationtorch.cuda.amp) for speedtorch.profiler before optimizingnum_workers > 0 for I/O