技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
swin-transformer【数据与研究】Use this repo skill for Microsoft Swin-Transformer image-classification model, config, data, checkpoint, SimMIM, Swin-MoE, and optional CUDA acceleration workflows.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill when a task involves the official Microsoft Swin-Transformer image-classification codebase: Swin V1/V2, Swin-MLP, SimMIM masked image modeling, ImageNet data layouts, pretrained checkpoint handling, supervised training/evaluation commands, Swin-MoE, or the optional fused CUDA window-process extension.
This is a self-contained operating guide. It does not require the original source checkout used during skill creation. When a workflow needs code execution, use the user's current checkout or installed copy of Swin-Transformer and the bundled helper scripts in this skill.
| User intent | Read next |
|---|---|
Build or inspect SwinTransformer, SwinTransformerV2, SwinMLP, build_model, tensor shapes, FLOPs, or CPU smoke models | sub-skills/core-models/SKILL.md |
Validate ImageNet folder/zip/22K layouts, understand --zip, map files, SimMIM data, checkpoint resume/pretrained behavior, or 22K-to-1K head remapping | sub-skills/data-and-checkpoints/SKILL.md |
Construct or debug supervised main.py commands for training, fine-tuning, evaluation, throughput, AMP, DDP launch, or --opts overrides | sub-skills/training-eval-cli/SKILL.md |
| Run or adapt SimMIM pretraining/fine-tuning/evaluation workflows and mask/loss checks | sub-skills/simmim-workflows/SKILL.md |
| Work with Swin-MoE, Tutel, Apex fused optimizers/layernorm, or the fused CUDA window-process extension | sub-skills/moe-and-acceleration/SKILL.md |
| Need a config/model family map before choosing a route | references/model-zoo-and-configs.md |
| Need shared YACS config and flag behavior | references/configuration.md |
| Need cross-cutting troubleshooting | references/troubleshooting.md |
| Need to verify that a checkout/environment is usable | scripts/check_env.py |
Swin-Transformer is a research-code checkout rather than an ordinary packaged distribution. For code execution, future agents should work against a current checkout or source tree on PYTHONPATH and install the runtime dependencies relevant to the selected workflow:
timm==0.4.12, yacs, PyYAML, numpy, scipy, and termcolor.swin_window_process CUDA extension for --fused_window_process.Minimal import smoke for a checkout:
python - <<'PY'
from config import get_config
from models import build_model
from data import build_loader
print('Swin-Transformer modules import')
PY
If that fails, read references/troubleshooting.md before running full training.
scripts/check_env.py --repo-root <checkout> to check required imports and optional CUDA/Tutel/Apex/fused-extension availability without training or downloading.scripts/inspect_swin_config.py --repo-root <checkout> --cfg <config.yaml> to summarize a YAML config and flag risky settings.scripts/swin_cli_command_builder.py --help to assemble copyable command templates for supervised, SimMIM, and MoE workflows.These helpers are safe by default: they do not download models or data, do not run distributed training, and do not build CUDA extensions.
Read references/repo-provenance.md before deciding whether this skill matches a particular checkout. If source APIs, config layout, CLI flags, or dependency behavior differ, refresh this repo skill before relying on it.