abcnn_model.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:visual-question-answering-tensorflow 作者: lmelvix 项目源码 文件源码
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")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号