I have run into the following error while training a BERT classifier. The
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'
What could be the possible data type error here since I have not typecasted any variable to either long or double?
Thanks in advance!
In a classification task, the data type for input labels should be Long but you assigned them as float64
type(b_labels[i]) = tensor(1., dtype=torch.float64)
=>
type(b_labels[i]) = tensor(1., dtype=torch.long)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With