title: Printing none in the output
body: <p>I have the following code to calculate the output of each layer in Keras.<br />
  When I run the below code None is printed in the output.</p>
  <pre><code> single_layer_mem=1
   output_shape=model.layers[1].output.shape
   trainable_count=model.layers[1].count_params()
  
   for s in output_shape:
       if s is None:
           continue
       single_layer_mem *= s
  
   total_memory = 4*(5*single_layer_mem+ trainable_count )
   print(total_memory)
  </code></pre>
  <p>The formula for calculating total memory required by DNN model is as follows:</p>
  <pre><code>total_memory = 4 * (batch_size * memory + trainable_count + non_trainable_count)
  </code></pre>
  <p>I would like to confirm:</p>
  <ul>
  <li>If I have to calculate per layer memory requirement or output data size</li>
  <li>If above code I have written is correct or not.</li>
  </ul>