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

About the loss function problem #7

Closed
Pefect96 opened this issue Mar 27, 2024 · 2 comments
Closed

About the loss function problem #7

Pefect96 opened this issue Mar 27, 2024 · 2 comments

Comments

@Pefect96
Copy link

Pefect96 commented Mar 27, 2024

In the function of

l1 = self.L_l1(mean, target)
, nn.L1Loss is inconsistent with Eq.3 in the paper, and Eq. 3 does not include the nn.L1Loss.

Waiting for your help! @udion @sgk98

@bravePinocchio
Copy link

bravePinocchio commented Aug 29, 2024

Why isn't this line of code being used instead of the twenty-ninth line of code? Beta is power in the paper.

ProbVLM/src/losses.py

Lines 28 to 29 in cb69f28

# resi = torch.pow(resi*one_over_alpha1, beta1).clamp(min=self.resi_min, max=self.resi_max)
resi = (resi*one_over_alpha1*beta1).clamp(min=self.resi_min, max=self.resi_max)

image

@udion
Copy link
Collaborator

udion commented Aug 29, 2024

For stability during training, beta in power leads to unstable training hitting nans, so we used Taylor series approximation, explained in Appendix of the paper here: https://arxiv.org/pdf/2307.00398 (Eq. 16 in appendix A)

@udion udion closed this as completed Aug 29, 2024
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

3 participants