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

use highway network and employ decaying learning rate #58

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

primetang
Copy link

use highway network and employ decaying learning rate in the new code.

@@ -126,15 +134,21 @@
checkpoint_prefix = os.path.join(checkpoint_dir, "model")
if not os.path.exists(checkpoint_dir):
os.makedirs(checkpoint_dir)
saver = tf.train.Saver(tf.global_variables())
try:
saver = tf.train.Saver(tf.global_variables())
Copy link
Owner

@dennybritz dennybritz Dec 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the try/catch needed? Can't you just say saver = tf.train.Saver()?

@dennybritz
Copy link
Owner

Also, I think batches_num_pre_epoch is somewhat of a strange name. I think it should be num_batches_per_epoch. I also think it would be cleaner to not decay per epoch, but decay per some number of steps and have a parameter for that and get rid of that batches per epoch function.

@primetang
Copy link
Author

Thank you for your attention, I have rewrite the code about decay_step, and use saver = tf.train.Saver() instead of try/catch.

@qwaider
Copy link

qwaider commented Jan 31, 2017

Interested

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

Successfully merging this pull request may close these issues.

3 participants