zoukankan      html  css  js  c++  java
  • tensorflow keras 问题汇总

    1. AttributeError: module 'tensorflow.python.keras.backend' has no attribute 'get_graph'

    问题原因:tf 和 keras 版本不匹配,具体匹配,可参考:https://blog.csdn.net/weixin_40109345/article/details/106730050

    安装指定版本,比如tensorflow1.9.0对应keras版本2.2.0,

    操作:pip install keras==2.2.0

    安装后查看kears版本是否正确:import keras         keras.__version__

    anaconda3.5(内置python3.6),tf-gpu 1.8.0,pip安装的时候出现两个错误:

      (1)Invalid requirement: '=='

        等号不能识别,需要 额外安装包 pyls

      在cmd检查是否安装过pyls,命令:import pyls

      如果没有版本信息,就是用 pip install pyls安装即可

    参考:https://blog.csdn.net/King_W_G/article/details/103019448

      (2)TypeError: parse() got an unexpected keyword argument 'transport_encoding'

    造成原因不确定,解决方法,依次输入以下命令尝试:

      1)conda install -c anaconda html5lib

      2)conda install pip
      3)打开对应安装 文件夹Anaconda3Libsite-packagespipindex.py文件,将第730行 ‘transport_encoding=encoding’注释掉

    参考:https://blog.csdn.net/lzw17750614592/article/details/85019330

  • 相关阅读:
    在source insight中阅读Python代码
    修改linux命令行提示符
    gcc链接程序时出现undefined reference to""错误
    [转]init.d解析
    [转]Linux中find常见用法示例
    Linux的网卡由eth0变成了eth1,如何修复?
    测试使用Windows Live Writer
    黑盒测试
    白盒测试技术(二)
    白盒测试技术(一)
  • 原文地址:https://www.cnblogs.com/shyzh/p/13916292.html
Copyright © 2011-2022 走看看