标签: plot keras
我想画一个机器学习模型。 在某些论文中,他们像https://tches.iacr.org/index.php/TCHES/article/view/7388/6560中的图11、12、13、14、15一样水平绘制模型。 这些似乎是从喀拉拉邦得出的模型。 我该怎么做?
答案 0 :(得分:0)
您可以使用以下示例:
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' )
结果是: