fixed deep stack status update

This commit is contained in:
2025-12-18 12:31:32 +01:00
parent 5cbef6b09f
commit f6bccd3737
3 changed files with 12 additions and 8 deletions
+3 -2
View File
@@ -16,7 +16,7 @@ class Entity:
if batch_size == 0:
batch_size = training_remain
status.on_change({})
status.on_change()
d_progress = 100.0 / (training_remain/batch_size * self.params.num_epochs)
batch_row_index = 0
training_seen = 0
@@ -49,8 +49,9 @@ class Entity:
self.state.b_h += inc_bh
self.state.w_hv += inc_whv
# Calculate error
# check if status update is needed
if status.want_report(round(training_seen*d_progress)):
# Calculate error
err_rms = rms_error_accu(mini_batch - self.h_to_pv(self.v_to_ph(v_states)))
if not status.on_change({"progress": {"value": round(training_seen * d_progress), "unit": "%"},
"err_rms": {"value": err_rms, "unit": ""}}):