📌  相关文章
📜  '`pydot` 调用 GraphViz 失败. OSError: `pydot` 调用 GraphViz 失败.请安装 GraphViz (https: www.graphviz.org) 并确保其可执行文件在 $PATH 中. - 打字稿代码示例

📅  最后修改于: 2022-03-11 14:48:13.760000             🧑  作者: Mango

代码示例1
from keras.models import Sequential
from keras.layers import Dense
from keras.utils.vis_utils import plot_model
import os
os.environ["PATH"] += os.pathsep + 'C:/Program Files (x86)/Graphviz2.38/bin/'
model = Sequential()
model.add(Dense(2, input_dim=1, activation='relu'))
model.add(Dense(1, activation='sigmoid'))
plot_model(model, to_file='model_plot.png', show_shapes=True, show_layer_names=True)