MCPcopy Index your code
hub / github.com/OpenGVLab/HumanBench / accuracy_multi

Function accuracy_multi

PATH/core/utils.py:102–106  ·  view source on GitHub ↗
(output, target)

Source from the content-addressed store, hash-verified

100 return res
101
102def accuracy_multi(output, target):
103 pred = (output > 0).float()
104 tf = (pred == target).float()
105 acc = tf.sum() / output.size(0) / output.size(1) * 100
106 return acc
107
108def save_state(state, path, step):
109 path, filename = os.path.split(path)

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected