- added shape to layer - changed construction of layer from Stack factory - fixed rms_error_accu scaling - RBM: added image display using opencv - improved Status print
22 lines
626 B
Python
22 lines
626 B
Python
class Status:
|
|
def __init__(self):
|
|
self.progress = -1
|
|
|
|
def on_change(self, status: dict) -> bool:
|
|
if status == {}:
|
|
self.progress = -1
|
|
|
|
if "progress" in status.keys():
|
|
progress = status["progress"]['value']
|
|
if self.progress < 0 or progress - self.progress >= 10:
|
|
self.progress = progress
|
|
print("-------------------------------------------")
|
|
for key in status.keys():
|
|
value = status[key]['value']
|
|
unit = status[key]['unit']
|
|
if isinstance(value, float):
|
|
print(f"{key} : {value:0.6f}{unit}")
|
|
else:
|
|
print(f"{key} : {value}{unit}")
|
|
return True
|