You must feed a value for placeholder tensor 'Placeholder' with dtype float......?

编程入门 行业动态 更新时间:2024-10-10 04:21:05
You must feed a value for placeholder tensor 'Placeholder' with dtype float......? 学习使用tensorflow实现卷积神经网络,显示错误如下: InvalidArgumentError: You must feed a value for placeholder tensor 'Placeholder' with dtype float and shape [128,24,24,3] [[Node: Placeholder = Placeholder[dtype=DT_FLOAT, shape=[128,24,24,3], _device="/job:localhost/replica:0/task:0/cpu:0"]()]] 有大神能指教下这是哪错了?

最满意答案

1. 上面的placeholder占位符(理解为声明)没有被赋值(成为变量),为找具体的placeholder最好给它命名(定义的时候) 2. 查看的输入的placeholder的shape和dtype是否正确 3. 当输入的placeholder的shape和dtype正确时,那么注意在计算图中是否有对该placeholder(成为变量了)进行运算或重新赋值

更多推荐

本文发布于:2023-07-27 08:32:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1287774.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:tensor   placeholder   feed   float   dtype

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!