【发布时间】:2018-11-14 04:33:52
【问题描述】:
我有一个 Tensorflow 张量 [[1]],如何将这个张量更改为 [1],它只是一个数字?
非常感谢!
【问题讨论】:
-
你能和我们分享一下你到目前为止的尝试吗?
-
[1] 不是一个数字,它是一个包含一个元素的列表(或一维张量)。
-
我需要在我的代码中执行 tf.matmul(A,wt1)) ,其中 A 类似于 [[1,2,3]] 和 wt = tf.Variable(tf.truncated_normal( [filter_size, 1],平均值 = 0.0,stddev = 1.0,dtype = tf.float64))。我想存储 matmul 的输出(类似于 [[1]]),但我不知道如何存储。谢谢!
标签: python tensorflow