0
点赞
收藏
分享

微信扫一扫

tensorflow reverse_sequence实例

爪哇驿站 2022-07-27 阅读 68


import tensorflow as tf

a = tf.constant([[1,2,3], [1,2,3], [1,2,3]])
l = tf.constant([2,2,2],tf.int64)
b = tf.reverse_sequence(a,seq_lengths=l,batch_dim = 0,seq_dim = 1)
c = tf.Print(b,[b],summarize=9)
with tf.Session() as sess:
sess.run(c)

tensorflow reverse_sequence实例_tensorflow


举报

相关推荐

0 条评论