tensorflow的bug解决
文章平均质量分 50
落花雨12138
感兴趣的方向为图像分类、目标检测、压缩感知、超分辨率等
展开
-
解决tensorflow中 RuntimeError: tf.placeholder() is not compatible with eager execution
运行tf 1.x版本是代码报错错误提示:RuntimeError: tf.placeholder() is not compatible with eager execution.只需增加一行代码放在前面:原创 2022-09-22 16:50:01 · 361 阅读 · 0 评论 -
解决 AttributeError: module ‘tensorflow‘ has no attribute ‘contrib‘ 等类似的问题
使用tensorflow2.x版本的时候,使用调用tensorflow1.x函数的代码时,常常会出现module ‘tensorflow’ has no attribute ‘contrib’这样的问题,这是由于tensorflow2.x废弃了很多tensorflow1.x API接口,本文针对常见的几种错误来使tf2.0不降版本也能运行代码。原创 2022-09-22 16:41:01 · 39588 阅读 · 4 评论