junxnone / examples

some code/notebook examples
0 stars 0 forks source link

keras model text summary and plot graph #67

Open junxnone opened 5 years ago

junxnone commented 5 years ago

Summary

model.summary()
Layer (type)                 Output Shape              Param #   
=================================================================
dense_1 (Dense)              (None, 512)               401920    
_________________________________________________________________
dropout_1 (Dropout)          (None, 512)               0         
_________________________________________________________________
dense_2 (Dense)              (None, 512)               262656    
_________________________________________________________________
dropout_2 (Dropout)          (None, 512)               0         
_________________________________________________________________
dense_3 (Dense)              (None, 10)                5130      
=================================================================
Total params: 669,706
Trainable params: 669,706
Non-trainable params: 0
_________________________________________________________________

Plot model

keras.utils.plot_model(model, to_file='models/mnist_mlp.png')

image

junxnone commented 5 years ago

3