MCPcopy Create free account
hub / github.com/ASLP-lab/OSUM / steps_per_second

Method steps_per_second

OSUM/wenet/utils/common.py:350–356  ·  view source on GitHub ↗
(self, cur_step, restart=True)

Source from the content-addressed store, hash-verified

348 self.last_time = time.time()
349
350 def steps_per_second(self, cur_step, restart=True):
351 value = ((float(cur_step) - self.last_iteration) /
352 (time.time() - self.last_time))
353 if restart:
354 self.start()
355 self.last_iteration = float(cur_step)
356 return value
357
358
359def tensor_to_scalar(x):

Callers 1

log_per_stepFunction · 0.45

Calls 1

startMethod · 0.95

Tested by

no test coverage detected