Skip to content
This repository has been archived by the owner on May 19, 2022. It is now read-only.

Commit

Permalink
fix the bug for E only mode for save logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Nanco-L committed Aug 24, 2018
1 parent 745840e commit 197ce50
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion simple_nn/models/neural_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,8 @@ def train(self, user_optimizer=None, user_atomic_weights_function=None):

# Temp saving
#if (epoch+1) % self.inputs['save_interval'] == 0:
if save_stack > self.inputs['save_interval'] and prev_eloss > eloss and prev_floss > floss:
if save_stack > self.inputs['save_interval'] and prev_eloss > eloss and \
((prev_floss > floss) or floss == 0.):
self._save(sess, saver)
prev_eloss = eloss
prev_floss = floss
Expand Down

0 comments on commit 197ce50

Please sign in to comment.