layers.py 文件源码

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

项目:LiTeFlow 作者: petrux 项目源码 文件源码
def body(self, time, inp, state, finished, output_ta):
        """Body of the dynamic decoding phase."""
        # invoke the decoder step.
        output, next_inp, next_state, decoder_finished = self._decoder.step(time, inp, state)

        # check the termination status and filter the output.
        next_finished = tf.logical_or(finished, decoder_finished)
        next_finished = tf.logical_or(next_finished, self._helper.finished(time, output))
        output = self.output(output, finished)

        output_ta = output_ta.write(time, output)
        ntime = tf.add(time, 1)

        return ntime, next_inp, next_state, next_finished, output_ta

    # pylint: disable=W0613,I0011,R0913
    # disable unused arguments (needed for the loop).
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号