Keras - 可视化模块keras.utils.visualize_util

1.How to setup

https://www.jianshu.com/p/62c04326732a

https://www.jianshu.com/p/3a97c0a43beb   (recommend!)

结合这两个blog,即可知道安装流程。

不需要在命令行pip install graphviz;但下面这两个(尤其第二个)需要安装。

pip install pydot-ng 
pip install pydot==1.2.3  #这个很关键

graphviz需要自己去官网下载,然后解压,配置系统环境变量即可。

2. potential bug

OSError: pydot failed to call GraphViz

https://blog.csdn.net/william_hehe/article/details/85311143

解决办法:

卸载高版本的pydot,安装如下版本的。

pip install pydot==1.2.3  #这个很关键

3.How to use it

https://www.jianshu.com/p/3a97c0a43beb   (recommend!)

需要额外说明,下面的代码尽量放在在model编译之后。

plot_model(model,to_file='model1.png',show_shapes=True)

4.outcome

猜你喜欢

转载自blog.csdn.net/Zhou_Dao/article/details/106203349