gaojingsheng / LAMM

Code and Dataset for the paper "LAMM: Label Alignment for Multi-Modal Prompt Learning" AAAI 2024
MIT License
26 stars 0 forks source link

something wrong about the code of KL distillation loss #1

Open Clayne2027 opened 5 months ago

Clayne2027 commented 5 months ago

When I run the training scripits, it reported an RuntimeError: Expected object of scalar type Long but got scalar type Half for argument #2 'target' in call to _thnn_nll_loss_forward for the code in line 52, helpers.py(loss = F.cross_entropy(s / T, p, reduction="mean") * (T ** 2)).) How can I fix this?

gaojingsheng commented 5 months ago

I think you could consider checking things like the versions of Python libraries.

Clayne2027 commented 5 months ago

I think you could consider checking things like the versions of Python libraries.

thanks, I will try