mirror of
https://github.com/rakuri255/UltraSinger.git
synced 2026-11-30 09:13:57 +09:00
downgrade tensorflow dependency, improve plot, add timer
downgrade tensorflow dependency to last version with gpu support for windows update plot to be a linear progression between notes on the y axis and include confidence information add timer component to measure process time
This commit is contained in:
1 parent
34237671b6
commit
de45b7c96a
18 files changed
+528
-240
No files matched your search
@@ -0,0 +1,26 @@
|
||||
import atexit
|
||||
from functools import reduce
|
||||
from time import process_time
|
||||
|
||||
from modules.console_colors import ULTRASINGER_HEAD
|
||||
|
||||
|
||||
def seconds_to_str(t):
|
||||
"""Format seconds to string"""
|
||||
return "%d:%02d:%02d.%03d" % reduce(
|
||||
lambda ll, b: divmod(ll[0], b) + ll[1:], [(t * 1000,), 1000, 60, 60]
|
||||
)
|
||||
|
||||
|
||||
def log(s):
|
||||
"""Log line with optional time elapsed"""
|
||||
print(f"{ULTRASINGER_HEAD} {seconds_to_str(process_time())} - {s}")
|
||||
|
||||
|
||||
def end_log():
|
||||
"""Log at program end"""
|
||||
log("End Program")
|
||||
|
||||
|
||||
atexit.register(end_log)
|
||||
log("Initialized...")
|
||||
Reference in new issue
Block a user