【Tensorflow Erro】 TypeError: The value of a feed cannot be a tf.Tensor object.
tensorflow
一个面向所有人的开源机器学习框架
项目地址:https://gitcode.com/gh_mirrors/te/tensorflow
免费下载资源
·
TypeError: The value of a feed cannot be a tf.Tensor object. Acceptable feed values include Python scalars, strings, lists, numpy ndarrays, or TensorHandles.For reference, the tensor object was Tensor("ExpandDims:0", shape=(1, 28, 28, 1), dtype=float32) which was passed to the feed with key Tensor("input0:0", dtype=float32).
报错feed 不能是一个 tf.Tensor对象,无法执行,报错代码如下:
if ckpt1 and ckpt1.model_checkpoint_path:
save.restore(sess, ckpt1.model_checkpoint_path)
for step in range(10):
print(sess.run(y_pre,feed_dict={x1:img1}))
改为:
if ckpt1 and ckpt1.model_checkpoint_path:
save.restore(sess, ckpt1.model_checkpoint_path)
for step in range(10):
x_in = sess.run(img1)
print(sess.run(y_pre,feed_dict={x1:x_in}))
程序正常。
GitHub 加速计划 / te / tensorflow
184.55 K
74.12 K
下载
一个面向所有人的开源机器学习框架
最近提交(Master分支:2 个月前 )
a49e66f2
PiperOrigin-RevId: 663726708
3 个月前
91dac11a
This test overrides disabled_backends, dropping the default
value in the process.
PiperOrigin-RevId: 663711155
3 个月前
更多推荐
已为社区贡献4条内容
所有评论(0)