floodsung / LearningToCompare_FSL

PyTorch code for CVPR 2018 paper: Learning to Compare: Relation Network for Few-Shot Learning (Few-Shot Learning part)
MIT License
1.04k stars 267 forks source link

IndexError: scatter_(): Expected dtype int64 for index. #38

Open mmmmmmrluo opened 3 years ago

mmmmmmrluo commented 3 years ago

i hava no idea to solve the problem. can you help me? Thanks

xyqqqfs commented 3 years ago

Hi!Were you able to resolve this issue?

DhyanilMehta commented 2 years ago

You can add .long() to batch_labels.view(-1,1) in the line of code where the error is coming. Then the error will go away.

xyqqqfs commented 2 years ago

The problem has been solved, thank you very much!