Louis-udm / VGCN-BERT

MIT License
121 stars 35 forks source link

RuntimeError: expected scalar type Float but found Double #19

Closed dinaYounes closed 3 years ago

dinaYounes commented 3 years ago

Hello, Thank You for the project you uploaded I am getting the following error. Any idea how to fix it?? Any fast reply would be very appreciated!! Thank You and Best Regards, Capture12345

noghte commented 3 years ago

You can change line 341 to: loss = F.cross_entropy(logits.view(-1, num_classes), label_ids, loss_weight.float()) I made a pull request for this fix: https://github.com/Louis-udm/VGCN-BERT/pull/20