Files
pyRBM/src/rbm/status.py
T
jens 6ef577c769 - fixed armadillo data read
- 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
2025-12-17 17:05:40 +01:00

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