text-classification-cnn-rnn icon indicating copy to clipboard operation
text-classification-cnn-rnn copied to clipboard

关于run_rnn里的train函数

Open AhaYujie opened this issue 6 years ago • 1 comments

loss_train, acc_train = session.run([model.loss, model.acc], feed_dict=feed_dict) 这句代码放在 session.run(model.optim, feed_dict=feed_dict) # 运行优化 这句代码的前面,如果执行了if total_batch % config.print_per_batch == 0:里的代码,那么运行优化步骤的dropout就变成了1.0了不是吗?

AhaYujie avatar May 19 '19 08:05 AhaYujie

:smile: 恭喜你发现了代码的一点小 bug,我这边修复一下,这个 bug 会影响到一个 batch 的训练,对整体的结果影响不大。

gaussic avatar May 19 '19 13:05 gaussic