-
Notifications
You must be signed in to change notification settings - Fork 542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
supervised contrastive loss function #20
Comments
If not, you need to modify it accordingly. But the logic should not be hard. |
Hi, |
Hi i am sorry.
I am at rest now.
Yes,
In may case, i changed input size to [batch, 1, dim]
And in that case, denum could be zero if there is no same label.
So you should add some small value, like 0.0000001
Thanks
-----Original Message-----
From: "JuliaWolleb"<[email protected]>
To: "HobbitLong/SupContrast"<[email protected]>;
Cc: "YuBeomGon"<[email protected]>; "Author"<[email protected]>;
Sent: 2020-09-24 (목) 15:48:11 (GMT+09:00)
Subject: Re: [HobbitLong/SupContrast] supervised contrastive loss function (#20)
Hi,
I have the same problem. Did you mean that the loss function SupConLoss should be modified? If yes, how? Or did you mean only the input dimensions to[batch size, 1, z_dim(128)]?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
input tensor to SupConLoss need to have 3 dimenstion.
batch size, 2(two features made from augmentation), z_dim(128)
if I dont want augmentation,
[batch size, 1, z_dim(128)] is ok for SupConLoss ??
loss value is almost nan for batch(32)
thanks
The text was updated successfully, but these errors were encountered: