title: ValueError: only one element tensors can be converted to Python scalars when converting list to float Torch tensor
body: <p>I have the following:</p>
  <pre><code>type of X is:  &lt;class 'list'&gt;
  X: [tensor([[1.3373, 0.5666, 0.2337,  ..., 0.4899, 0.1876, 0.5892],
          [0.0320, 0.0797, 0.0052,  ..., 0.3405, 0.0000, 0.0390],
          [0.1305, 0.1281, 0.0021,  ..., 0.6454, 0.1964, 0.0493],
          ...,
          [0.2635, 0.0237, 0.0000,  ..., 0.6635, 0.1376, 0.2988],
          [0.0241, 0.5464, 0.1263,  ..., 0.5766, 0.2352, 0.0140],
          [0.1740, 0.1664, 0.0057,  ..., 0.6056, 0.1020, 1.1573]],
         device='cuda:0')]
  </code></pre>
  <p>However, following the instructions in <a href="https://www.aiworkbox.com/lessons/convert-list-to-pytorch-tensor" rel="nofollow noreferrer">this video</a>, I get this error:</p>
  <pre><code>    X_tensor = torch.FloatTensor(X)
  ValueError: only one element tensors can be converted to Python scalars
  </code></pre>
  <p>I have the following conversion code:</p>
  <pre><code>X_tensor = torch.FloatTensor(X)
  </code></pre>
  <p>How can I fix this problem?</p>
  <pre><code>$ python
  Python 3.8.10 (default, Nov 26 2021, 20:14:08)
  [GCC 9.3.0] on linux
  Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
  &gt;&gt;&gt; import torch
  &gt;&gt;&gt; torch.__version__
  '1.10.1+cu113'
  </code></pre>
  <p>X here is a list of torch.tensors.</p>