title: How do I flatten a tensor in pytorch?
body: <p>Given a tensor of multiple dimensions, how do I flatten it so that it has a <em><strong>single</strong></em> dimension?</p>
  <pre><code>torch.Size([2, 3, 5])    ⟶ flatten ⟶    torch.Size([30])
  </code></pre>