问题:

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‘问题解决相关推荐

  1. 解决tensorflow报错:AttributeError: module ‘tensorflow.keras.backend‘ has no attribute ‘get_session‘ 问题

    欢迎大家关注笔者,你的关注是我持续更博的最大动力 原创文章,转载告知,盗版必究 解决tensorflow报错:AttributeError: module 'tensorflow.keras.back ...

  2. attributeError: module ‘keras.utils‘ has no attribute ‘get_file‘

    attributeError: module 'keras.utils' has no attribute 'get_file' 将代码改为: from keras.utils.data_utils ...

  3. class ProposalLayer(KE.Layer): AttributeError: module ‘keras.engine‘ has no attribute ‘Layer‘

    训练mask rcnn的时候出现:AttributeError: module 'keras.engine' has no attribute 'Layer' 可能是版本问题!!! 卸载: pip u ...

  4. 成功解决 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 ...

  5. 关于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 ...

  6. 不降低scipy版本解决AttributeError: module ‘scipy.misc‘ has no attribute ‘imresize‘问题

    问题描述 在Tensorflow2.1.0上运行代码出现 AttributeError: module 'scipy.misc' has no attribute 'imresize' 查阅资料大多都 ...

  7. 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 ...

  8. AttributeError: module ‘cv2.cv2‘ has no attribute ‘xfeatures2d‘解决方法

    运行一段关于图像拼接的代码时,出现问题 AttributeError: module 'cv2.cv2' has no attribute 'xfeatures2d' def __init__(sel ...

  9. AttributeError: module 'tensorflow_core.estimator' has no attribute 'inputs'

    AttributeError: module 'tensorflow_core.estimator' has no attribute 'inputs' 这是tensorflow版本问题,在tenso ...

最新文章

  1. 【错误记录】VMware 虚拟机报错 ( 向 VMWare 虚拟机中的 Ubuntu 系统拷贝文件时磁盘空间不足 )
  2. 研发流程与项目管理之关系
  3. 链表c的经典实现(一)
  4. 解决ntp的错误 no server suitable for synchronization found
  5. _CRT_SECURE_NO_WARNINGS宏-转
  6. python的socket编程执行顺序_Python篇-Socket网络编程
  7. Unix 下的 vim 如何使用系统剪贴板
  8. NEO从源码分析看共识协议
  9. c语言谭浩强ppt课件,编程_C语言学习课件_谭浩强_PPT~1216F.ppt
  10. java数据结构编程问题_Java语言程序设计与数据结构第十一版(基础篇)第一章编程练习题答案...
  11. python迅雷下载器_简单的迅雷VIP账号获取器(Python)
  12. Latex希腊字母对照表
  13. 关于腾讯云搭建代理服务器的详细过程
  14. dell最新计算机如何U盘引导,戴尔台式电脑如何bios设置U盘启动教程
  15. python动态爬虫_Python动态网页爬虫技术
  16. 怎么能防止网站被注入eval(base64_decode这种类型的木马?
  17. 怎么用Q-Q图验证数据集的分布
  18. UnityC#字串如何获取换行符号-最基础的字串处理方法,也最容易常见错误
  19. php微信公众号向指定客服发信息,微信公众号给用户发送一条消息 客服消息
  20. TortoiseGit中如何设置Beyond Compare作比较代码差异

热门文章

  1. css mix-blend,详解CSS3的mix-blend-mode属性
  2. 计算机考研英语自我介绍范文,考研复试英语自我介绍范文
  3. 入职体检时为什么要检查血常规
  4. 什么是S参数? S参数的含义?
  5. python类方法的作用-python:类方法的目的是什么?
  6. bmzctf-crypto writeup(二) (持续更新)
  7. 深度技术 GHOST XP SP3 快速装机专业版 V2013.03
  8. Android开发从入门到精通教程大总结(源码,教程,面试题,书籍,视频)
  9. 三菱服务器显示003C,三菱gps-3电梯开关门特慢门机板显示c.是哪里问题?
  10. 【计算机网络实验】 主机路由器服务器的基本配置 | Cisco Packet Tracer