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

Commit

Permalink
indent saving part
Browse files Browse the repository at this point in the history
  • Loading branch information
Nanco-L committed Sep 4, 2018
1 parent 818857d commit 231c265
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions simple_nn/models/neural_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,16 +628,16 @@ 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) or floss == 0.):
temp_time = timeit.default_timer()
self._save(sess, saver)
prev_eloss = eloss
prev_floss = floss
save_stack = 1
save_time = timeit.default_timer() - temp_time
else:
save_time = 0
if save_stack > self.inputs['save_interval'] and prev_eloss > eloss and \
((prev_floss > floss) or floss == 0.):
temp_time = timeit.default_timer()
self._save(sess, saver)
prev_eloss = eloss
prev_floss = floss
save_stack = 1
save_time = timeit.default_timer() - temp_time
else:
save_time = 0

#self._save(sess, saver)

Expand Down

0 comments on commit 231c265

Please sign in to comment.