title: Repeating a pytorch tensor without copying memory
body: <p>Does <code>pytorch</code> support repeating a tensor <strong>without allocating significantly more memory</strong>?</p>
  
  <p>Assume we have a tensor</p>
  
  <pre><code>t = torch.ones((1,1000,1000))
  t10 = t.repeat(10,1,1)
  </code></pre>
  
  <p>Repeating <code>t</code> 10 times will require take 10x the memory. Is there a way how I can create a tensor <code>t10</code> without allocating significantly more memory?</p>
  
  <p><a href="https://stackoverflow.com/questions/55153237/pytorch-embedding-tensor-in-another-without-copying">Here</a> is a related question, but without answers.</p>