title: What does -1 mean in pytorch view?
body: <p>As the question says, what does <code>-1</code> do in pytorch <code>view</code>?</p>
  <pre class="lang-py prettyprint-override"><code>&gt;&gt;&gt; a = torch.arange(1, 17)
  &gt;&gt;&gt; a
  tensor([  1.,   2.,   3.,   4.,   5.,   6.,   7.,   8.,   9.,  10.,
           11.,  12.,  13.,  14.,  15.,  16.])
  
  &gt;&gt;&gt; a.view(1,-1)
  tensor([[  1.,   2.,   3.,   4.,   5.,   6.,   7.,   8.,   9.,  10.,
            11.,  12.,  13.,  14.,  15.,  16.]])
  
  &gt;&gt;&gt; a.view(-1,1)
  tensor([[  1.],
          [  2.],
          [  3.],
          [  4.],
          [  5.],
          [  6.],
          [  7.],
          [  8.],
          [  9.],
          [ 10.],
          [ 11.],
          [ 12.],
          [ 13.],
          [ 14.],
          [ 15.],
          [ 16.]])
  </code></pre>
  <p>Does it (<code>-1</code>) generate additional dimension?
  Does it behave the same as numpy <code>reshape</code> <code>-1</code>?</p>