fix mean loss history after save

This commit is contained in:
Colombo 2020-01-30 07:49:45 +04:00
parent 9fd49ee3f0
commit 3e63ba2d17

View file

@ -133,7 +133,7 @@ def trainerThread (s2c, c2s, e,
shared_state['after_save'] = False
last_save_time = time.time()
mean_loss = np.mean ( [ np.array(loss_history[i]) for i in range(save_iter, iter) ], axis=0)
mean_loss = np.mean ( loss_history[save_iter:iter], axis=0)
for loss_value in mean_loss:
loss_string += "[%.4f]" % (loss_value)