topk_accuracy

topk_accuracy(output, target, topk)

Computes the precision@k for the specified values of k

Arguments

outputs -- A torch FloatTensor of arbitrary shape targets -- A torch LongTensor of the same size except along the channels dimension (the target dimension - 1) topk -- The k to compute the topk accuracy for - _Returns_:

A scalar tensor equal to the topk accuracy of the output


accuracy

accuracy(output, target)