MCPcopy Create free account
hub / github.com/LAMDA-CL/CVPR22-Fact / measure

Method measure

utils.py:66–73  ·  view source on GitHub ↗
(self, p=1)

Source from the content-addressed store, hash-verified

64 self.o = time.time()
65
66 def measure(self, p=1):
67 x = (time.time() - self.o) / p
68 x = int(x)
69 if x >= 3600:
70 return '{:.1f}h'.format(x / 3600)
71 if x >= 60:
72 return '{}m'.format(round(x / 60))
73 return '{}s'.format(x)
74
75
76def count_acc(logits, label):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected