Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2 train steps for a single batch? #104

Open
larin92 opened this issue May 29, 2017 · 3 comments
Open

2 train steps for a single batch? #104

larin92 opened this issue May 29, 2017 · 3 comments

Comments

@larin92
Copy link

larin92 commented May 29, 2017

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?

@shy1
Copy link

shy1 commented Jun 23, 2017

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

@larin92
Copy link
Author

larin92 commented Jun 23, 2017

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

@GaoleMeng
Copy link
Contributor

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants