title: Create CNN model architecture diagram in Keras
body: <p>I followed the tutorial to create visually graphical representation of CNN model using this: <a href="https://keras.io/visualization/" rel="nofollow noreferrer">https://keras.io/visualization/</a> </p>
  
  <p>My code at the moment is as follows:</p>
  
  <pre><code>from keras.utils import plot_model
  from keras.applications.resnet50 import ResNet50
  import numpy as np
  
  model = ResNet50(weights='imagenet')
  plot_model(model, to_file='model.png')
  </code></pre>
  
  <p>When I use the aforementioned code I am able to create a graphical representation (using Graphviz) of ResNet50 and save it in 'model.png'. But I want to create block diagram of the CNN model with the layers instead. An example of my desired output is as follows:
  <a href="https://i.stack.imgur.com/rLICu.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rLICu.jpg" alt="enter image description here"></a></p>
  
  <p>Any idea how I can achieve the aforementioned block diagram programatically instead of just generating the graph diagram of the CNN model?</p>