Can you give an example on how to use topk to extract probability?
I am able to get labels, using the following code:
_, predictedTop5_test = output.topk(5)
label1 = predictedTop5_test.data[0][0]
label2 = predictedTop5_test.data[0][1]
label3 = predictedTop5_test.data[0][2]
label4 = predictedTop5_test.data[0][3]
label5 = predictedTop5_test.data[0][4]

How do you edit this to get probabilities for each class?