v0.9.98
AccuracyCalculator breaking change (issue #290)
The k
parameter in AccuracyCalculator has a new behavior. The allowed values are:
None
. This means k will be set to the total number of reference embeddings.- An integer greater than 0. This means k will be set to the input integer.
"max_bin_count"
. This means k will be set tomax(bincount(reference_labels)) - self_count
whereself_count == 1
if the query and reference embeddings come from the same source.
The old behavior is described here.
If your dataset is large, you might find the k-nn search is now very slow. This is because the new default behavior is to set k to len(reference_embeddings)
. To avoid this, you can set k to a number, like k = 1000
or try k = "max_bin_count"
to get behavior similar (though not identical) to the old default.
Apologies for the drastic change. I'm hoping to have things stable and following semantic versioning when v1.0 arrives.
Bug fixes
lmu.convert_to_triplets
has been fixed (#291)- Losses and miners should now be compatible with autocast (#293)
New features / improvements
- The loss used in Supervised Contrastive Learning. Documentation: SupConLoss. By @fjsj (#281, #288)
- Vectorized
convert_to_triplets
(#279)