
tensorflow
YL_python_C++_java
不定期更新 自动驾驶、辅助驾驶、遥感相关、深度学习相关、python相关、C语言、C++、java相关。
展开
-
RuntimeError: The Session graph is empty. Add operations to the graph before calling run().
问题产生的原因:无法执行sess.run()的原因是tensorflow版本不同导致的,tensorflow版本2.0无法兼容版本1.0.解决办法:tf.compat.v1.disable_eager_execution()```pythonimport tensorflow as tftf.compat.v1.disable_eager_execution() #保证sess.run()能够正常运行hello = tf.constant('hello,tensorflow')sess= t原创 2021-06-24 18:59:24 · 330 阅读 · 0 评论 -
深度学习遥感图像分类常用数据集简介以及下载地址
UC Merced Land-Use Data Set图像像素大小为256*256,总包含21类场景图像,每一类有100张,共2100张。下载地址:http://weegee.vision.ucmerced.edu/datasets/landuse.htmlWHU-RS19 Data Set图像像素大小为600*600,总包含19类场景图像,每一类大概50张,共1005张。下载地址:http://dsp.whu.edu.cn/cn/staff/yw/HRSscene.htmlSIRI-.原创 2020-12-25 09:17:47 · 12864 阅读 · 3 评论 -
AttributeError: module ‘tensorflow‘ has no attribute ‘space_to_depth‘
应该还是tensorflow2.0 的锅我的环境是win10,python3.7我安装的是 tensorflow2.0和keras2.4,然后运行报错了(吴恩达老师的深度学习第四周第三课)yolo_model = load_model("model_data/yolov2.h5")yolo_model.summary()解决办法:我终究还是妥协了,把tensorflow降到了 1.14.0 然后 kera降到了 2.3.1首先卸载安装的 tensorflow2.0和keras2.4分别原创 2020-09-14 15:45:26 · 2619 阅读 · 21 评论 -
RuntimeError: get_session is not available.[keras中K.get_session()无法使用]【tensorflow2.0】
RuntimeError: get_session is not available when using TensorFlow 2.0.import tensorflow as tffrom keras import backend as K在tensorflow2.0中无法使用get_session()函数若直接运行以下代码会报错 K.get_session().run(tf.variables_initializer([max_boxes_tensor])) #初始化变量max_boxes原创 2020-09-14 09:45:48 · 2654 阅读 · 1 评论 -
RuntimeError: tf.placeholder() is not compatible with eager execution.解决方法
在写吴恩达老师的第四课第一周作业时,由于我的tensorflo是2.3版本,自己改了之后出现了以下错误提示RuntimeError: tf.placeholder() is not compatible with eager execution.错误代码:def create_placeholders(n_H0, n_W0, n_C0, n_y): """ 为session创建占位符 参数: n_H0 - 实数,输入图像的高度 n_W0 -原创 2020-09-06 10:06:09 · 3605 阅读 · 3 评论 -
tensorflow安装错误:ERROR: Cannot uninstall ‘wrapt‘.
用cmd :pip install tensorflow 时出错ERROR: Cannot uninstall ‘wrapt’. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.解决办法:先输入以下代码:pip install wrapt --ignor原创 2020-09-01 23:22:36 · 289 阅读 · 0 评论 -
【安装tensorflow】使用清华开源镜像安装 tensorflow
使用清华开源镜像安装tensorflow安装tensorflow时,如果使用直接安装速度相对较慢,采取清华大学的镜像会提高速度。GPU版本安装方法:pip install tensorflow-gpu==2.2 -i https://pypi.tuna.tsinghua.edu.cn/simpleCPU版本安装方法:pip install tensorflow==2.2 -i https://pypi.tuna.tsinghua.edu.cn/simple备注:安装的时候需要python是64位原创 2020-08-10 14:51:35 · 31373 阅读 · 4 评论