def ques_semantics(word, weight, bias):
with tf.variable_scope('LSTM') as scope:
word = tf.unstack(word, 22, 1)
lstm_cell = rnn.BasicLSTMCell(256, forget_bias=1.0)
output, states = rnn.static_rnn(lstm_cell, word, dtype=tf.float32)
ques_sem = tf.matmul(states[-1], weight) + bias
return tf.nn.relu(ques_sem, "ques-semantics-acitvation")
abcnn_model.py 文件源码
python
阅读 17
收藏 0
点赞 0
评论 0
评论列表
文章目录