Skip to content

Commit

Permalink
Merge pull request #11 from pmsinner/patch-1
Browse files Browse the repository at this point in the history
Fixed Empty Placeholder error in train1.py
  • Loading branch information
andabi authored Jan 11, 2018
2 parents 24737a1 + ba7dab2 commit f2f1da1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions train1.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,11 @@ def train(logdir='logdir/default/train1', queue=True):
sess.run(train_op, feed_dict={model.x_mfcc: mfcc, model.y_ppgs: ppg})

# Write checkpoint files at every epoch
summ, gs = sess.run([summ_op, global_step])

if queue:
summ, gs = sess.run([summ_op, global_step])
else:
summ, gs = sess.run([summ_op, global_step], feed_dict={model.x_mfcc: mfcc, model.y_ppgs: ppg})

if epoch % hp.Train1.save_per_epoch == 0:
tf.train.Saver().save(sess, '{}/epoch_{}_step_{}'.format(logdir, epoch, gs))

Expand All @@ -88,4 +91,4 @@ def get_arguments():
case = args.case
logdir = '{}/{}/train1'.format(logdir_path, case)
train(logdir=logdir)
print("Done")
print("Done")

0 comments on commit f2f1da1

Please sign in to comment.