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

  • 相关阅读:
    .NET XmlNavigator with Namespace
    编程要素
    【FOJ】1962 新击鼓传花游戏
    【POJ】1389 Area of Simple Polygons
    【POJ】2482 Stars in Your Window
    【HDU】3265 Posters
    【HDU】1199 Color the Ball
    【HDU】3642 Get The Treasury
    【HDU】4027 Can you answer these queries?
    【HDU】1542 Atlantis
  • 原文地址:https://www.cnblogs.com/shyzh/p/13916292.html
Copyright © 2011-2022 走看看