📌  相关文章
📜  ('导入 pydot 失败.你必须 `pip install pydot` 并安装 graphviz (https: graphviz.gitlab.io 下载), ', '才能使 `pydotprint` 工作.') - C++ 代码示例

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

代码示例3
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)