title: Pytorch Error, RuntimeError: expected scalar type Long but found Double
body: <p>I have run into the following error while training a BERT classifier. The </p>
  
  <pre><code>type(b_input_mask) = type(b_labels) = torch.Tensor      
  
  type(b_labels[i]) = tensor(1., dtype=torch.float64)
  
  type(b_input_masks[i]) = class'torch.Tensor'
  </code></pre>
  
  <p>What could be the possible data type error here since I have not typecasted any variable to either long or double?</p>
  
  <p>Thanks in advance!
  <a href="https://i.stack.imgur.com/Jy1He.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Jy1He.png" alt="Error Stack Trace "></a></p>