Replies: 1 comment
-
For BCELosss |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi I am pasting the issue and our discussion carried out so far from another roadmap(#1465 (comment)) in PyG. Can you please assist in the following matter?
-->[always-ready2learn]
Hi @rusty1s I have changes TGN.py model for link prediction into edge classification. The model runs for me but unfortunately loss is very high and remains constant through out which means that model is not learning at all. I am not sure what I am missing here. So far I am using similar TGN link prediction example and have made following changes in the train and test functions as:
y_pred = pos_out.argmax(dim=1)
y_true = batch.y
loss = criterion(y_pred.float(), y_true.float())
I am not sure what I am missing here. the loss value turns out to be 8.02 and remains constant, same goes for accuracy which turns out to be a constant value of .65.Could you think of what I might be missing please?
@rusty1s
Member
Author
-->[rusty1s]commented 8 hours ago
If you want to perform classification, then I think y_true shouldn't be a floating-point tensor. What's the loss function you are using? Note that this is best discussed in a separate issue/discussion - not necessarily in this roadmap issue here :)
--> Hi thanks for your reply, I changed y_true to long and y_pred to float. The loss function I tried with is BCELoss and CrossEntropyLoss. Same issue is occurring with both.
Thanks for pointing that, I found it to be similar topic but you are right issue is quite diff. I’ll move this discussion to a separate issue sooner. :)
Beta Was this translation helpful? Give feedback.
All reactions