TensorFlow报错:InvalidArgumentError: You must feed a value for placeholder tensor ‘Placeholder_2’ with dtype float
如图:
InvalidArgumentError: You must feed a value for placeholder tensor ‘Placeholder_2’ with dtype float
[[node Placeholder_2 (defined at :40) ]]
分析:sess.run(train_step, feed_dict = {xs: batch_xs, ys: batch_ys}) 中 feed_dict 缺少参数
解决方式:补充 keep_prob:0.5,如下所示:
sess.run(train_step, feed_dict = {xs: batch_xs, ys: batch_ys, keep_prob: 0.5})
转载自:https://blog.csdn.net/qq_36512295/article/details/100528628