问题来源于使用了 keras.utils.plot_model,报错内容为:

2018-08-29 08:58:21.937037: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
/home/you/Documents/workspace/PycharmProjects/venv/lib/python3.6/site-packages/keras/engine/saving.py:269: UserWarning: No training configuration found in save file: the model was *not* compiled. Compile it manually.
warnings.warn('No training configuration found in save file: '
Traceback (most recent call last):
File "/home/you/Documents/workspace/PycharmProjects/venv/lib/python3.6/site-packages/pydot.py", line 1861, in create
stderr=subprocess.PIPE, stdout=subprocess.PIPE)
File "/usr/lib/python3.6/subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.6/subprocess.py", line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'dot': 'dot' During handling of the above exception, another exception occurred: Traceback (most recent call last):
File "/home/you/Documents/workspace/PycharmProjects/venv/lib/python3.6/site-packages/keras/utils/vis_utils.py", line 26, in _check_pydot
pydot.Dot.create(pydot.Dot())
File "/home/you/Documents/workspace/PycharmProjects/venv/lib/python3.6/site-packages/pydot.py", line 1867, in create
raise OSError(*args)
FileNotFoundError: [Errno 2] "dot" not found in path. During handling of the above exception, another exception occurred: Traceback (most recent call last):
File "/home/you/Documents/workspace/PycharmProjects/venv/src/test.py", line 8, in <module>
plot_model(model, to_file=MODEL_PNG)
File "/home/you/Documents/workspace/PycharmProjects/venv/lib/python3.6/site-packages/keras/utils/vis_utils.py", line 132, in plot_model
dot = model_to_dot(model, show_shapes, show_layer_names, rankdir)
File "/home/you/Documents/workspace/PycharmProjects/venv/lib/python3.6/site-packages/keras/utils/vis_utils.py", line 55, in model_to_dot
_check_pydot()
File "/home/you/Documents/workspace/PycharmProjects/venv/lib/python3.6/site-packages/keras/utils/vis_utils.py", line 29, in _check_pydot
'`pydot` failed to call GraphViz.'
OSError: `pydot` failed to call GraphViz.Please install GraphViz (https://www.graphviz.org/) and ensure that its executables are in the $PATH. Process finished with exit code 1

  第一反应是pip3 install graphviz,但安装完后依然不好使。

后来查官网可以使用apt install graphviz,问题解决。

最新文章

  1. Go - 函数/方法 的 变参
  2. winform 使用 ReportViewer做报表
  3. sed笔记
  4. 使用异步js解决模态窗口切换的办法
  5. guava cache
  6. document.createElement
  7. __main__:1: Warning: Unknown table &#39;employ&#39; 0L
  8. C语言的指针移位问题
  9. 响应者链 hittest:withEvent: 方法的使用
  10. 8月1日起,这些新政将影响移动互联网产业-b
  11. java_反射_及其简单应用(2016-11-16)
  12. Java Dwr3实现消息推送步骤详解
  13. 一款非常推荐的用户界面插件----EasyUI
  14. 51nod 1376 最长递增子序列的数量(线段树)
  15. vue2.0实现过滤
  16. Promise(interesting)
  17. 帮助Bsny(乱搞做法)
  18. gevent模块学习(三)
  19. glance系列二:glance部署及操作
  20. Jenkins-Multijob plugin多任务串并行

热门文章

  1. 搜索:N皇后
  2. 2015/8/10 Python基本使用(1)
  3. iOS 点击cell上的按钮获取行数
  4. 知问前端——Ajax提交表单
  5. windows修改文件的修改或者创建时间
  6. 省队集训 Day7 选点游戏
  7. SQL SERVER 常用公式
  8. Vue组件-使用插槽分发内容
  9. Yii 1.1.17 四、属性标签、AR类增删改查、使用上传类与扩展第三方类库
  10. C中级 消息队列设计