tf.gather 实例

2022-10-26 11:19:19
import tensorflowas tf

temp = tf.range(0,10)*10 + tf.constant(1,shape=[10])
temp2 = tf.gather(temp,[1,5,9])with tf.Session()as sess:print sess.run(temp)print sess.run(temp2)

输出
[ 1 11 21 31 41 51 61 71 81 91]
[11 51 91]

  • 作者:theDunker
  • 原文链接:https://guotong1988.blog.csdn.net/article/details/53172882
    更新时间:2022-10-26 11:19:19