Skip to content

CNN Model: Plot

Yang YueXiang edited this page Aug 18, 2019 · 1 revision

%matplotlib inline
from keras.utils.vis_utils import plot_model
import matplotlib.image as mpimg
import matplotlib.pyplot as plt

# Save our model diagrams to this path
model_diagrams_path = 'D:\\development\\DeepLearningCV\\Trained Models\\'

# Generate the plot
plot_model(model, to_file = model_diagrams_path + 'cifar_simple_cnn_2.png',
           show_shapes = True,
           show_layer_names = True)

# Show the plot here
img = mpimg.imread(model_diagrams_path + 'cifar_simple_cnn_2.png')
plt.figure(figsize=(90,30))
imgplot = plt.imshow(img) 

Clone this wiki locally