hankcs / CS224n

CS224n: Natural Language Processing with Deep Learning Assignments Winter, 2017

Home Page:http://www.hankcs.com/tag/cs224n/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

q3_gru.py add_prediction_op() 中dynamic_rnn应该取output作为值而不是state吧?

dulm opened this issue · comments

commented

outputs, state = tf.nn.dynamic_rnn(cell, x, dtype=tf.float32)
output = outputs[:, -1]
preds = tf.sigmoid(output)

虽然gru中两者是等同的

Vanilla RNN中也是这样的,这里应该是不考虑LSTM的。