- layer: only calculate rms_error_accu() if status report is necessary

- Status: added wants_report
This commit is contained in:
2025-12-18 11:39:45 +01:00
parent 28fee91ec7
commit 905ae8da81
3 changed files with 14 additions and 14 deletions
+6 -4
View File
@@ -69,10 +69,12 @@ class Layer:
self.state.w_hv += inc_whv
# 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": ""}}):
keep_running = False
break
if status.want_report(round(training_seen*d_progress)):
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": ""}}):
keep_running = False
break
training_seen += 1