- refactored Status

- added update interval
This commit is contained in:
2025-12-17 18:52:18 +01:00
parent 4aba7585cc
commit 866b61c77b
2 changed files with 23 additions and 12 deletions
+4 -2
View File
@@ -12,11 +12,11 @@ def cv_show(name: str, vec: np.array, shape):
class MyStatus(Status):
def __init__(self, _stack: StackDeep, _batch: np.ndarray):
Status.__init__(self)
Status.__init__(self, update_interval=2)
self.stack = _stack
self.batch = _batch
def on_change(self, status: dict) -> bool:
def on_report(self, status: dict) -> bool:
# Show reconstruction
# Shape of training vector
shape = self.stack.from_index(0).shape[0:2] + (1,)
@@ -25,6 +25,8 @@ class MyStatus(Status):
img = self.stack.pass_down_up(self.batch[n,:])
cv_show("img", img, shape)
cv.waitKeyEx(1)
Status.print_status(status)
return True
def read_armadillo(filename: str) -> np.ndarray: