title: model.summary() output is not consistent with model definition
body: <p>I'm using the subclassing API to build a simple conv net and I want to use the summary method to get an idea of what the architecture looks like for my model. However, when I call model.summary(), the layers are out of order and the output
  shape is not shown either. Is there a clean way of getting around this? or do I need to override the model.summary() method in the model class.</p>
  <p>Here are the layers in question:</p>
  <pre class="lang-py prettyprint-override"><code>class thing(keras.Model):
      def __init__(self, **kwargs):
          super().__init__(**kwargs)
          self.conv1 = keras.layers.convolutional.Conv2D(96, 
                                                         kernel_size= (11, 11), 
                                                         strides= 4, 
                                                         activation = &quot;relu&quot;,
                                                         data_format=&quot;channels_last&quot;,
                                                         input_shape= (277,277, 3))
  
          self.flatten = keras.layers.Flatten(data_format=&quot;channels_last&quot;)
          
          self.dense = keras.layers.Dense(4096, activation= &quot;relu&quot;)
  
          self.pool = keras.layers.pooling.MaxPooling2D(pool_size= (3,3), strides = 2,
                                                        data_format=&quot;channels_last&quot;)
      def call(self, inputs):
          conv1 = self.conv1(inputs)
          pool1 = self.pool(conv1)
          flatten_conv = self.flatten(pool1)
          ff_1 = self.dense(flatten_conv)
  
          return ff_1
  
  
  a = thing()
  
  a.build(input_shape=(None, 277, 277, 3))
  
  a.summary()
  
  
  
  OUTPUT: 
  Model: &quot;thing_9&quot;
  _________________________________________________________________
  Layer (type)                 Output Shape              Param #   
  =================================================================
  conv2d_9 (Conv2D)            multiple                  34944     
  _________________________________________________________________
  flatten_9 (Flatten)          multiple                  0         
  _________________________________________________________________
  dense_14 (Dense)             multiple                  415240192 
  _________________________________________________________________
  max_pooling2d_9 (MaxPooling2 multiple                  0         
  =================================================================
  Total params: 415,275,136
  Trainable params: 415,275,136
  Non-trainable params: 0
  _________________________________________________________________
  
  </code></pre>