3.0.0rc3¶
This is the third release candidate for version 3.0.0. It changes defaults and sampler behavior that are easier to change before the final release. The 3.0.0rc1 notes describe version 3 as a whole, and the migration guide covers version 2 names.
Changed defaults¶
DotProductSimilarity()now computes a plain dot product. Passnormalize_embeddings=Truefor the previous behavior.NPairsLossandNormalizedSoftmaxLossrequest normalization explicitly, so their default objectives do not change (#670).TripletMarginLossnow defaults tomargin=0.2, matchingTripletMarginMinerand FaceNet. Passmargin=0.05for the previous default (#466).
New features¶
SelfSupervisedLossaccepts more than two views:loss_func(view_1, view_2, view_3). All views of a sample are positives of each other, and they reach the wrapped loss in one call. Withsymmetric=False, only the first view provides anchors (#580).
Sampler changes¶
MPerClassSamplernow yields whole batches. Pass it asDataLoader(dataset, batch_sampler=sampler)and remove theDataLoaderbatch_size.batch_sizeis a required sampler argument, andnum_batchesreplacesnum_samples(#612).MPerClassSamplerrotates through shuffled passes of classes and of each class's examples. Class counts, and example counts within a class, stay within one of each other. The default length visits every example at least once, and exactly once when equal class sizes divide evenly. See the coverage guarantees (#684).
Documentation¶
-
The macOS OpenMP section now covers using Faiss and UMAP in one process. Importing this package loads neither Faiss nor UMAP, so the conflict arises only when an application uses Faiss with PyTorch (#617).
-
Recipe pages link to readable source on GitHub for the matching release instead of Python files that browsers download.