Is there a way to return classification results as confidence scores from a pyTorch Variable? I can easily retrieve topk results from Variable but they’re just floats with various negative/positive values (e.g. [-0.201, 5.627, 0.982, 3.221]. I’m looking to get the confidence instead (where all numbers sum up to 1.0 e.g. [0.84, 0.11, 0.026, 0.024]) Does anyone know how to obtain/compute this?
Thanks