title: converting list of tensors to tensors pytorch
body: <p>I have list of tensor where each tensor has a different size. How can I convert this list of tensors into a tensor using PyTorch?</p>
  <p>For instance,</p>
  <pre><code>x[0].size() == torch.Size([4, 8])
  x[1].size() == torch.Size([4, 7])  # different shapes!
  </code></pre>
  <p>This:</p>
  <pre><code>torch.tensor(x)
  </code></pre>
  <p>Gives the error:</p>
  <blockquote>
  <p>ValueError: only one element tensors can be converted to Python scalars</p>
  </blockquote>