- layer: only calculate rms_error_accu() if status report is necessary
- Status: added wants_report
This commit is contained in:
+6
-4
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user