【发布时间】:2016-05-06 12:49:29
【问题描述】:
我想通过索引列表对张量进行切片以获取特定的张量,例如:
word_weight = tf.get_variable("word_weight", [20])
a= word_weight[ [1,6,5] ]
(我想得到word_weight[1], word_weight[6], word_weight[5])
但是当我运行代码时出现以下错误:
ValueError: Shape (16491,) must have rank 3
【问题讨论】:
标签: python tensorflow deep-learning