title: Plotting subclassed model in tensorflow-2.0 beta
body: <p>I have a subclassed model that instantiates a few custom layers via subclassing.  I tried using <code>keras.utils.plot_model()</code> but all it does is print the model block, none of the layers appeared.  </p>
  
  <p>Can a Tensorflow expert comment on this?  Will this feature ever be implemented in the future?  If not, what is the next best alternative to examine the computation graph?  Note that <code>model.summary()</code> only gives a summary of the parameters of the custom layer, within which contains two dense layers.  Ideally, I like to see all the computations, if that is not asking too much...</p>
  
  <p><strong>Update</strong>: I dug into the source, looks like plot_model() first check for the <code>_is_graph_network</code> attribute.  Graph Networks are used in Functional and Sequential APIs.  From the source:</p>
  
  <blockquote>
    <p>Two types of <code>Networks</code> exist: Graph Networks and Subclass Networks. Graph
     networks are used in the Keras Functional and Sequential APIs. Subclassed
     networks are used when a user subclasses the <code>Model</code> class. In general,
     more Keras features are supported with Graph Networks than with Subclassed
     Networks, specifically:</p>
    
    <ul>
    <li>Model cloning (<code>keras.models.clone()</code>)</li>
    <li>Serialization (<code>model.get_config()/from_config()</code>, <code>model.to_json()/to_yaml()</code>)</li>
    <li>Whole-model saving (<code>model.save()</code>)</li>
    </ul>
  </blockquote>
  
  <p>(<strong>custom graph component</strong>)
  Naturally, I like to know if I can build a graph network component, so my subclassed model/layer can work with these features.  Does that involve a lot of effort?</p>
  
  <p>(<strong>tf.function graph visualization</strong>)
  Can someone let me know if graph visualization via Tensorboard works with Tensorflow2 tf.functions?  In Tensorflow 1.x, one defines a name scope for a logical group of ops (e.g. generator/discriminator in GAN, encoder/decoder in VAE and loss/metrics), they are then displayed as a high-level block in the graph visualization.  Can I define something similar for tf.functions?</p>