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

myConfusion #17

Open
tutou-pifeng opened this issue Mar 6, 2024 · 1 comment
Open

myConfusion #17

tutou-pifeng opened this issue Mar 6, 2024 · 1 comment

Comments

@tutou-pifeng
Copy link

Why code below, in the project, can be used as "loss".
oloss = t.bmm(ovectors, ivectors).squeeze().sigmoid().log().mean(1) nloss = t.bmm(nvectors, ivectors).squeeze().sigmoid().log().view(-1, context_size, self.n_negs).sum(2).mean(1)

In my judgment, "loss" should be "prediction" - "actual result".
But, in the upper code, "oloss" is prediction, without operation on actual result.

@theeluwin
Copy link
Owner

I thought of loss as some quantity that needs to be optimized. From this perspective, the goal of the given code is to maximize the difference in likelihood between positive and negative cases.

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

2 participants