技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
dataset-sampling【数据与研究】Routes dataset-wrapper and batch-sampling tasks for SiameseMNIST, TripletMNIST, and BalancedBatchSampler in the Siamese-triplet repository.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the task is about how the repository builds pair and triplet examples, how it samples balanced mini-batches, or how it adapts MNIST-like datasets to the repository's legacy torchvision conventions.
SiameseMNISTTripletMNISTBalancedBatchSamplerRead this sub-skill for tasks that mention:
train_data / train_labels / test_data / test_labels compatibilityreferences/api-reference.md for the wrapper contracts and returned shapes.references/troubleshooting.md if a fixture or dataset does not expose the attributes this repo expects.scripts/check_dataset_wrappers.py when you want a tiny no-download smoke.datasets.py and the loader cells in both notebooks.transform=None for the smoke check, or attach the same transforms the notebook would use.SiameseMNIST -> (img1, img2), targetTripletMNIST -> (img1, img2, img3), [] for the test fixture pathBalancedBatchSampler -> n_classes × n_samples indices per batchSiameseMNIST when the downstream loss is contrastive and the model expects exactly two inputs.TripletMNIST when the downstream loss is triplet-based and the model expects three inputs.BalancedBatchSampler only when the next stage mines pairs or triplets inside a mini-batch.data and targets instead of train_data and train_labels.28×28 uint8 data before PIL conversion.n_classes × n_samples indices.1×28×28 tensors after transforms are applied.references/api-reference.md for exact return values and sampler behavior.references/troubleshooting.md for legacy torchvision compatibility and batch-shape issues.../embedding-losses-mining/SKILL.md if the next step is a loss or mining check.../training-experiments/SKILL.md if the next step is an end-to-end fit loop.