title: Why can't I append a PyTorch tensor with torch.cat?
body: <p>I have:</p>
  
  <pre><code>import torch
  
  input_sliced = torch.rand(180, 161)
  output_sliced = torch.rand(180,)
  
  batched_inputs = torch.Tensor()
  batched_outputs = torch.Tensor()
  
  print('input_sliced.size', input_sliced.size())
  print('output_sliced.size', output_sliced.size())
  
  batched_inputs = torch.cat((batched_inputs, input_sliced))
  batched_outputs = torch.cat((batched_outputs, output_sliced))
  
  print('batched_inputs.size', batched_inputs.size())
  print('batched_outputs.size', batched_outputs.size())
  
  </code></pre>
  
  <p>This outputs:</p>
  
  <pre><code>input_sliced.size torch.Size([180, 161])
  output_sliced.size torch.Size([180])
  
  batched_inputs.size torch.Size([180, 161])
  batched_outputs.size torch.Size([180])
  </code></pre>
  
  <p>I need the <code>batched</code> ones to append, but the <code>torch.cat</code> isn't working. What am I doing wrong?</p>