小编Hai*_*eng的帖子

tensorflow ValueError:Shape必须为1级,但是为2级

import tensorflow as tf
x = [[1,2,3],[4,5,6]]
y = [0,1]
z = [1,2]
x = tf.constant(x)
y = tf.constant(y)
z = tf.constant(z)
m = x[y,z]
Run Code Online (Sandbox Code Playgroud)

我期待的是 m = [2,6]

我可以通过theano或numpy获得结果.我如何使用张量流得到结果?

deep-learning tensorflow

5
推荐指数
1
解决办法
2725
查看次数

标签 统计

deep-learning ×1

tensorflow ×1