MCPcopy Create free account
hub / github.com/VincentHancoder/SSGD / accuracy

Function accuracy

mmdet/models/losses/accuracy.py:7–51  ·  view source on GitHub ↗

Calculate accuracy according to the prediction and target. Args: pred (torch.Tensor): The model prediction, shape (N, num_class) target (torch.Tensor): The target of each prediction, shape (N, ) topk (int | tuple[int], optional): If the predictions in ``topk``

(pred, target, topk=1, thresh=None)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 7

calculate_pos_recallMethod · 0.90
lossMethod · 0.90
lossMethod · 0.90
lossMethod · 0.90
get_accuracyMethod · 0.90
forwardMethod · 0.85
test_accuracyFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_accuracyFunction · 0.68