https://machinelearningmastery.com/visualize-deep-learning-neural-network-model-keras/
In [1]:
from keras.models import Sequential
from keras.layers import Dense
model = Sequential()
model.add(Dense(2, input_dim=1, activation='relu'))
model.add(Dense(1, activation='sigmoid'))
print(model.summary())
In [2]:
from keras.utils.vis_utils import plot_model
plot_model(model, to_file='model_plot.png', show_shapes=True, show_layer_names=True)
In [7]:
from IPython.display import Image
Image('model_plot.png')
Out[7]:
In [ ]: