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

train_op in linear regression #12

Closed
mzur opened this issue Jun 27, 2017 · 2 comments
Closed

train_op in linear regression #12

mzur opened this issue Jun 27, 2017 · 2 comments

Comments

@mzur
Copy link

mzur commented Jun 27, 2017

Is defining train_op for each data point and epoch anew really needed? I'm new to TensorFlow so I can't tell why or why not this would make sense. For me, the regression seems to work fine (and much faster) if the line is removed.

@astorfi
Copy link
Owner

astorfi commented Jun 27, 2017

Thank you so much for spending time and reading it. Basically, train_op is a crucial graph tensor which must be run by the TensorFlow session to perform a training step. As an example, performing a training step can be equivalent to updating the weights. In the code that you mentioned. train_op is the optimizer object, not just the loss.

You can refer to TensorFlow Mechanics for further details. Moreover, a detailed explanation is provided in Convolutional Neural Networks documentation.

@mzur
Copy link
Author

mzur commented Jun 28, 2017

Thanks for the explanation.

@mzur mzur closed this as completed Jun 28, 2017
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

2 participants