fix autobackup_hour

This commit is contained in:
Colombo 2020-02-27 11:13:45 +04:00
parent 9860a38907
commit a5783df546
2 changed files with 16 additions and 19 deletions

View file

@ -131,8 +131,7 @@ def trainerThread (s2c, c2s, e,
if shared_state['after_save']:
shared_state['after_save'] = False
last_save_time = time.time()
mean_loss = np.mean ( loss_history[save_iter:iter], axis=0)
for loss_value in mean_loss:
@ -160,6 +159,7 @@ def trainerThread (s2c, c2s, e,
io.log_info ('You can use preview now.')
if not is_reached_goal and (time.time() - last_save_time) >= save_interval_min*60:
last_save_time += save_interval_min*60
model_save()
send_preview()