AttributeError: module ‘keras.backend‘ has no attribute ‘get_session‘问题解决
问题:
Traceback (most recent call last):File "video.py", line 9, in <module>ssd = SSD()File "/home/pi/Desktop/Mobilenet-SSD-Essay-master/ssd.py", line 37, in __init__self.sess = K.get_session()
AttributeError: module 'keras.backend' has no attribute 'get_session'
原因
tensorflow和keras的版本太高导致的
我的版本如下:
TensorFlow2.3.0
keras2.4.3
解决办法
先定位到这行代码
from keras import backend as K
改为
from tensorflow.compat.v1.keras import backend as K
AttributeError: module ‘keras.backend‘ has no attribute ‘get_session‘问题解决相关推荐
- 解决tensorflow报错:AttributeError: module ‘tensorflow.keras.backend‘ has no attribute ‘get_session‘ 问题
欢迎大家关注笔者,你的关注是我持续更博的最大动力 原创文章,转载告知,盗版必究 解决tensorflow报错:AttributeError: module 'tensorflow.keras.back ...
- attributeError: module ‘keras.utils‘ has no attribute ‘get_file‘
attributeError: module 'keras.utils' has no attribute 'get_file' 将代码改为: from keras.utils.data_utils ...
- class ProposalLayer(KE.Layer): AttributeError: module ‘keras.engine‘ has no attribute ‘Layer‘
训练mask rcnn的时候出现:AttributeError: module 'keras.engine' has no attribute 'Layer' 可能是版本问题!!! 卸载: pip u ...
- 成功解决 AttributeError: module ‘keras.engine.topology‘ has no attribute ‘load_weights_from_hdf5_group_b
成功解决 AttributeError: module 'keras.engine.topology' has no attribute 'load_weights_from_hdf5_group_b ...
- 关于module ‘keras.applications’ has no attribute ‘nasnet’/ ‘keras’ has no attribute ‘application’的解决方案
报错代码段: nas = keras.applications.nasnet.NASNetLarge(input_shape=(331,331,3), include_top=False, weigh ...
- 不降低scipy版本解决AttributeError: module ‘scipy.misc‘ has no attribute ‘imresize‘问题
问题描述 在Tensorflow2.1.0上运行代码出现 AttributeError: module 'scipy.misc' has no attribute 'imresize' 查阅资料大多都 ...
- mxnet报错解决:AttributeError: module 'mxnet.context' has no attribute 'num_gpus'
早上在跑mxnet的mnist的示例代码时报错了,代码如下: import mxnet as mx ctx = mx.gpu(0) if mx.context.num_gpus() > 0 el ...
- AttributeError: module ‘cv2.cv2‘ has no attribute ‘xfeatures2d‘解决方法
运行一段关于图像拼接的代码时,出现问题 AttributeError: module 'cv2.cv2' has no attribute 'xfeatures2d' def __init__(sel ...
- AttributeError: module 'tensorflow_core.estimator' has no attribute 'inputs'
AttributeError: module 'tensorflow_core.estimator' has no attribute 'inputs' 这是tensorflow版本问题,在tenso ...
最新文章
- 【错误记录】VMware 虚拟机报错 ( 向 VMWare 虚拟机中的 Ubuntu 系统拷贝文件时磁盘空间不足 )
- 研发流程与项目管理之关系
- 链表c的经典实现(一)
- 解决ntp的错误 no server suitable for synchronization found
- _CRT_SECURE_NO_WARNINGS宏-转
- python的socket编程执行顺序_Python篇-Socket网络编程
- Unix 下的 vim 如何使用系统剪贴板
- NEO从源码分析看共识协议
- c语言谭浩强ppt课件,编程_C语言学习课件_谭浩强_PPT~1216F.ppt
- java数据结构编程问题_Java语言程序设计与数据结构第十一版(基础篇)第一章编程练习题答案...
- python迅雷下载器_简单的迅雷VIP账号获取器(Python)
- Latex希腊字母对照表
- 关于腾讯云搭建代理服务器的详细过程
- dell最新计算机如何U盘引导,戴尔台式电脑如何bios设置U盘启动教程
- python动态爬虫_Python动态网页爬虫技术
- 怎么能防止网站被注入eval(base64_decode这种类型的木马?
- 怎么用Q-Q图验证数据集的分布
- UnityC#字串如何获取换行符号-最基础的字串处理方法,也最容易常见错误
- php微信公众号向指定客服发信息,微信公众号给用户发送一条消息 客服消息
- TortoiseGit中如何设置Beyond Compare作比较代码差异
热门文章
- css mix-blend,详解CSS3的mix-blend-mode属性
- 计算机考研英语自我介绍范文,考研复试英语自我介绍范文
- 入职体检时为什么要检查血常规
- 什么是S参数? S参数的含义?
- python类方法的作用-python:类方法的目的是什么?
- bmzctf-crypto writeup(二) (持续更新)
- 深度技术 GHOST XP SP3 快速装机专业版 V2013.03
- Android开发从入门到精通教程大总结(源码,教程,面试题,书籍,视频)
- 三菱服务器显示003C,三菱gps-3电梯开关门特慢门机板显示c.是哪里问题?
- 【计算机网络实验】 主机路由器服务器的基本配置 | Cisco Packet Tracer