error:You must feed a value for placeholder tensor 'momentum' with dtype float

版权声明:任意转载 https://blog.csdn.net/Z609834342/article/details/83616385

问题描述:在tensorflow中用placeholder传值时,遇到了‘You must feed a value for placeholder tensor 'momentum' with dtype float’错误,feed_dict和placeholder都是一一对应的,但是只有‘momentum’这个参数报错。网上的各种方法都行不通,当我把这个参数删除时,程序就能正常运行。以为是命名冲突但是怎么改都报错,应该不是这个问题。

解决方法:未找到真正的原因,只能删除‘momentum’,在优化器中固定该值。

猜你喜欢

转载自blog.csdn.net/Z609834342/article/details/83616385
今日推荐