lightly-ai / lightly

A python library for self-supervised learning on images.
https://docs.lightly.ai/self-supervised-learning/
MIT License
3.12k stars 272 forks source link

Add more detailed docstring to knn predict #1316

Open IgorSusmelj opened 1 year ago

IgorSusmelj commented 1 year ago

We have here the knn predict code: https://github.com/lightly-ai/lightly/blob/df004d288fa07816e55975fa0af92868f9867436/lightly/utils/benchmarking/knn.py#L8

The problem is that the docstring doesn't tell us much about the returned values. One would expect a list of labels or a tensor with probabilities for all the classes. But we return a NxD shape tensor that contains the class indices sorted by probability. We should clarify that in the docstring.

Aienthu1 commented 1 day ago

Can you assign me this issue.

guarin commented 1 day ago

@Aienthu1 assigned :)