seq2seq.py 文件源码

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

项目:basic-encoder-decoder 作者: pemywei 项目源码 文件源码
def loop_function(self, prev, _):
        """
        :param prev: the output of t-1 time
        :param _:
        :return: the embedding of t-1 output
        """
        prev = tf.add(tf.matmul(prev, self.softmax_w), self.softmax_b)
        prev_sympol = tf.arg_max(prev, 1)

        emb_prev = tf.nn.embedding_lookup(self.target_embedding, prev_sympol)
        return emb_prev
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号