normalize knn probabilities
clemsgrs opened this issue · 0 comments
clemsgrs commented
In the following part of the code, the retrieved probabilities are not normalised (hence they're not really probabilities):
Lines 166 to 172 in cb71140
I'd suggest adding a quick normalising step right after to ensure they are actually probabilities (values between 0 and 1 & summing to 1):
probs = probs / probs.sum(dim=-1).unsqueeze(-1)
it's more a "nice to have" than an actual needed change