加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

keras使用pydot画图的问题

发布时间:2020-12-14 02:39:52 所属栏目:Windows 来源:网络整理
导读:from keras.utils import plot_model plot_model(model,to_file ="model.png",show_shapes=True,show_layer_names=True) 上面代码执行处做, Assertion Error 解决方案: This may help for someone who is looking for For Anaconda on Windows 10 64 Bit,E
from keras.utils import plot_model
plot_model(model,to_file="model.png",show_shapes=True,show_layer_names=True)

上面代码执行处做,Assertion Error

解决方案:

This may help for someone who is looking for For Anaconda on Windows 10 64 Bit,Environment: Windows 10 64 Bit,Python 3.5.2,Anaconda 4.2.0 (64-bit)

前三部分可能不需要:

  1. Download "graphviz-2.38.msi" from?https://graphviz.gitlab.io/_pages/Download/Download_windows.html
  2. Execute the "graphviz-2.38.msi" file
  3. Add the graphviz bin folder to the PATH system environment variable (Example: "C:Graphviz2.38bin")
  4. Go to Anaconda Prompt using start menu (Make sure to right click and select "Run as Administrator". We may get permission issues if Prompt as not opened as Administrator)
  5. Execute the command: conda install graphviz
  6. Execute the command: pip install git+https://github.com/nlhepler/pydot.git
  7. Execute the command "conda list" and make sure pydot and graphviz modules are listed.?
  8. go to python console,run following codes to check.
    import pydot
    pydot.find_graphviz()
    should show:
    {dot: C:ProgramDataAnaconda3Librarybingraphvizdot.exe,twopi: C:ProgramDataAnaconda3Librarybingraphviztwopi.exe,neato: C:ProgramDataAnaconda3Librarybingraphvizneato.exe,circo: C:ProgramDataAnaconda3Librarybingraphvizcirco.exe,fdp: C:ProgramDataAnaconda3Librarybingraphvizfdp.exe,sfdp: C:ProgramDataAnaconda3Librarybingraphvizsfdp.exe}

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读