Conversation
jacquesqiao
reviewed
Dec 1, 2017
| cost = tf.nn.softmax_cross_entropy_with_logits(prediction, label) | ||
| avg_cost = tf.reduce_mean(cost) | ||
| adam_optimizer = tf.train.AdamOptimizer(learning_rate=0.002) | ||
| train_op = adam_optimizer.minimizer(avg_cost) |
Collaborator
There was a problem hiding this comment.
minimizer => minimize?
qingqing01
reviewed
Dec 5, 2017
|
|
||
| initial_state = lstm_cell.zero_state(batch_size, dtype=tf.float32) | ||
| outputs, states = rnn.static_rnn( | ||
| lstm_cell, lstm_input, dtype=tf.float32) |
Collaborator
There was a problem hiding this comment.
这里看着只有一层lstm,可以设置多层stacked的lstm吗?
| train_reader = paddle.batch( | ||
| paddle.reader.shuffle( | ||
| paddle.dataset.imdb.train(word_dict), | ||
| buf_size=FLAGS.batch_size * 10), |
Collaborator
There was a problem hiding this comment.
IMDB traing set总共25 000,buf_size设置成25000吧,增加buf_size,应该可以加速度reader。
Owner
Author
There was a problem hiding this comment.
I don't think there is any difference, and the factor caused by buffer should be removed in our validation scripts.
qingqing01
approved these changes
Dec 5, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix PaddlePaddle/Paddle#6129