技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
siamese-triplet【数据与研究】Routes metric-learning workflows for the Siamese-triplet PyTorch repository: dataset pair/triplet wrappers, embedding networks, contrastive and triplet losses, online mining, and MNIST/FashionMNIST experiment recipes.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill for the repository's image metric-learning surface: sampled positive/negative pairs, triplet generation, online mining, embedding networks, and the notebook-style MNIST/FashionMNIST experiment recipes.
The repo is organized as top-level modules rather than an installable package. For later Researcher use, the modules should be importable from a checkout or module directory that contains datasets.py, losses.py, metrics.py, networks.py, trainer.py, and utils.py.
sub-skills/dataset-sampling/SKILL.md when you need pair or triplet dataset wrappers, the balanced batch sampler, or legacy torchvision dataset compatibility.sub-skills/embedding-losses-mining/SKILL.md when you need the embedding networks, siamese/triplet wrappers, contrastive or triplet losses, pair selectors, or online mining logic.sub-skills/training-experiments/SKILL.md when you need the fit loop, metrics, notebook recipes, embedding extraction, or tiny end-to-end training smoke checks.SKILL.md owns routing, dependency expectations, and cross-surface smoke selection.dataset-sampling owns data contracts and sampler behavior.embedding-losses-mining owns model, loss, selector, and mining behavior.training-experiments owns fit-loop, metric, and notebook-recipe behavior.scripts/smoke_repo_surface.py when checking end-to-end compatibility.scripts/smoke_repo_surface.py from a checkout or module directory that exposes the repo's top-level modules.train_data, train_labels, test_data, test_labels).EmbeddingNet defaults to a 2D embedding, so the repo's plotting and extraction helpers assume 2-dimensional outputs.fit prints train and validation status per epoch and is intentionally simple; it is a notebook-friendly training loop, not a generic production engine.python -m pip install torch torchvision numpy pillow matplotlib.--module-dir <repo-root>.python scripts/smoke_repo_surface.py --module-dir <repo-root>.references/api-reference.md for the core module and class/function map.references/workflows.md for the distilled MNIST and FashionMNIST experiment recipes.references/compatibility.md for torchvision and tensor-shape compatibility notes.references/troubleshooting.md for common failures and warning messages.references/repo-provenance.md for the source snapshot used to build this skill.references/repo-routing-metadata.json for repo-skills-router placement metadata.scripts/smoke_repo_surface.py is the bundled end-to-end smoke check for the repo surface. Use it when you want to confirm imports, shapes, selectors, and a tiny training pass from a current checkout or module directory.