title: Best way to flatten a 2D tensor containing a vector in TensorFlow?
body: <p>What is the most efficient way to flatten a 2D tensor which is actually a horizontal or vertical vector into a 1D tensor? </p>
  
  <p>Is there a difference in terms of performance between:</p>
  
  <pre><code>tf.reshape(w, [-1])
  </code></pre>
  
  <p>and</p>
  
  <pre><code>tf.squeeze(w)
  </code></pre>
  
  <p>?</p>