char-rnn-tensorflow
char-rnn-tensorflow copied to clipboard
2 train steps for a single batch?
Hi,
There are such lines of code at train.py
file:
train_loss, state, _ = sess.run([model.cost, model.final_state, model.train_op], feed)
summ, train_loss, state, _ = sess.run([summaries, model.cost, model.final_state, model.train_op], feed)
Means, we run 2 train steps on a single batch. Why?
directly above the 2nd line you quoted beginning with "summ, train_loss...," is the comment:
# instrument for tensorboard
anytime you see tensorFlow code referring to a summary or summaries, it likely there to facilitate tensorBoard visualization
Yes, but this can be accomplished in one execution of session.run. It looks like one of those lines should be commented out at a time
@larin92 Yeah I notice the same problem, I saw someone made a pull request and delete one line. But the pull request is not accepted by the auto code check.