title: In pytorch, how to fill a tensor with another tensor?
body: <p>I'm looking for a way to expand the size of an image by adding 0 values to the right &amp; lower edges of it. My initial plan is to use nn.padding to add the edge, until I encounter this error:</p>
  
  <pre><code>  File "/home/shared/virtualenv/dl-torch/lib/python3.7/site-packages/torch/nn/functional.py", line 2796, in pad
      assert len(pad) % 2 == 0, 'Padding length must be divisible by 2'
  AssertionError: Padding length must be divisible by 2
  </code></pre>
  
  <p>It appears that torch tries to pad the image from both side! Is there an easy way to override this and fill the tensor into the upper-left side of another image?</p>