You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This function can simple be replaced by 1 line - torch.cdist(query_fea, gallery_fea)
PyTorch's official docs don't list this function for 1.2 but it is supported (I've used it).
This change will reduce duplication and make the code more readable.
Thanks!
The text was updated successfully, but these errors were encountered:
Hi,
Thanks for the great work on this library!
I have a small suggestion to improve the pairwise distance calculation
https://github.com/PyRetri/PyRetri/blob/master/pyretri/index/re_ranker/re_ranker_impl/k_reciprocal.py#L35-L51
I see this function being used in 3 places - kreciprocal, knn and query expansion.
This function can simple be replaced by 1 line -
torch.cdist(query_fea, gallery_fea)
PyTorch's official docs don't list this function for 1.2 but it is supported (I've used it).
This change will reduce duplication and make the code more readable.
Thanks!
The text was updated successfully, but these errors were encountered: