Skip to content
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

对于少类别的数据微调,loss是否需要修改?微调后计算相似度值都很小,有时相似度为负值 #378

Open
1633232731 opened this issue Feb 25, 2025 · 0 comments

Comments

@1633232731
Copy link

感谢您的工作~

我观察到对于clip来讲,计算loss的时候是将对角线设置为1,其余全是0,;但是对于当样本类别少于batchsize的时候,即一个batch中会出现相同的文本标签,这个时候需不需要相应的将相同文本标签对不同图片的目标值设置为1?这似乎变成了一个多标签的优化问题,需不需要将loss函数变为BCELOSS?

我在这样操作的过程中在我的数据集上进行微调后,相似度会出现负值,这是合理的么?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant