Return the classification accuracy (as a percentage, 0-100) given true and predicted labels.
Input
y_true = tensor([1., 0., 1., 1., 0.]) y_pred = tensor([1., 0., 0., 1., 0.])
Output
tensor(80.)
This one's part of Premium. Unlock the full PyTorch track plus every other premium problem on the site.
solve(...)