title: PyTorch reshape tensor dimension
body: <p>I want to reshape a vector of shape <code>(5,)</code> into a matrix of shape <code>(1, 5)</code>.</p>
  <p>With numpy, I can do:</p>
  <pre><code>&gt;&gt;&gt; import numpy as np
  &gt;&gt;&gt; a = np.array([1, 2, 3, 4, 5])
  &gt;&gt;&gt; a.shape
  (5,)
  &gt;&gt;&gt; a = np.reshape(a, (1, 5))
  &gt;&gt;&gt; a.shape
  (1, 5)
  &gt;&gt;&gt; a
  array([[1, 2, 3, 4, 5]])
  </code></pre>
  <p>But how do I do this with PyTorch?</p>