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

  • 相关阅读:
    HDU
    矩形嵌套(DP)
    HDU
    HDU-1003 Max Sum
    Manacher算法—最长回文串
    Codeforces Round #460 (Div. 2) A B C D
    HDU 4540 威威猫系列故事——打地鼠 (简单DP)
    UVA 129 Krypton Factor(DFS 回溯)
    Codeforces 918A Eleven 918B Radio Station
    挑战程序设计竞赛(第2版)第112页勘误
  • 原文地址:https://www.cnblogs.com/shyzh/p/13916292.html
Copyright © 2011-2022 走看看