我想画一个机器学习模型。在一些论文中,他们在https://tches.iacr.org/index.php/TCHES/article/view/7388/6560中水平绘制模型,如图11、12、13、14、15。这些似乎是从keras中提取的模型。我怎么能这样做呢?
发布于 2020-06-12 06:16:06
您可以使用以下示例:
from keras.models import Sequential
from keras.layers import Dense, Activation
model = Sequential([
Dense(32, input_shape=(784,)),
Activation('relu'),
Dense(10),
Activation('softmax'),
])
from keras.utils import plot_model
plot_model(model,
show_shapes=True,
to_file='model.png'
)
结果是:
https://stackoverflow.com/questions/62337528
复制相似问题