Utility for finding the best threshold?

Author: ir2718Created Nov 22, 2024Updated Nov 24, 2024

Hi,

I would like to use an ONNX optimized version of a model trained using your library. However, for the use case of one-shot classification I need to determine a threshold for classification. Are there any utility functions which can calculate the optimal threshold based on a validation set, and a metric that I want to optimize for?

Source: KevinMusgrave/pytorch-metric-learning