title: Padding in Pytorch
body: <p>In PyTorch tensor, I would like to obtain the output from the input as follows:</p>
  
  <p><img src="https://i.stack.imgur.com/yiuho.png" alt="enter image description here"></p>
  
  <p>How can I achieve this padding in Pytroch?</p>