title: Difference between `tf.reshape(a, [m, n])` and `tf.transpose(tf.reshape(a, [n, m]))`?
body: <p>Actually, I'm doing the homework "Art Generation with Neural Style Transfer" of deeplearning.ai on coursera. In the function <code>compute_layer_style_cost(a_S, a_G):</code></p>
  
  <pre><code>a_S = tf.reshape(a_S, [n_H*n_W, n_C])
  a_G = tf.reshape(a_G, [n_H*n_W, n_C])
  
  GS = gram_matrix(tf.transpose(a_S))
  GG = gram_matrix(tf.transpose(a_G))
  </code></pre>
  
  <p>Why does this code give the right answer, however, the following doesn't:</p>
  
  <pre><code>a_S = tf.reshape(a_S, [n_C, n_H*n_W])
  a_G = tf.reshape(a_G, [n_C, n_H*n_W])
  
  GS = gram_matrix(a_S)
  GG = gram_matrix(a_G)
  </code></pre>