title: RuntimeError: Expected a Tensor of type torch.FloatTensor but found a type torch.IntTensor for sequence element
body: <p>I wanna generate some random number with python and transform it to tensor with pytorch. Here is my code for generating the random number and transform it into tensor.</p>
  
  <pre><code>import numpy as np
  import torch
  
  P = np.random.uniform(0.5, 1, size=[20, 1])
  k = np.random.randint(1, 20, size=[20, 1])
  d_k = np.random.uniform(0, np.sqrt(80000), size=[20, 1])
  
  P = torch.from_numpy(P).float()
  k = torch.from_numpy(k).int()
  d_k = torch.from_numpy(d_k).float()
  
  torch.cat((P, k, d_k), dim=-1)
  </code></pre>
  
  <p>Afterward, I got some error which showed:</p>
  
  <pre><code>RuntimeError: Expected a Tensor of type torch.FloatTensor but found a type torch.IntTensor for sequence element 1 in sequence argument at position #1 'tensors'
  </code></pre>