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

Is there an issue with the code for calculating the loss function #15

Open
gczzcc opened this issue Jun 10, 2024 · 0 comments
Open

Is there an issue with the code for calculating the loss function #15

gczzcc opened this issue Jun 10, 2024 · 0 comments

Comments

@gczzcc
Copy link

gczzcc commented Jun 10, 2024

I noticed that there might be an issue with the code for calculating the final pose loss function in the file located at 'DPDN-Pytorch1.9.0-Cuda11.2/model/losses.py'.
In the source code:
def PoseDis(r1, t1, s1, r2, t2, s2):
'''
r1, r2: b33
t1, t2: b3
s1, s2: b
3
'''
dis_r = torch.mean(torch.norm(r1 - r2, dim=1))
dis_t = torch.mean(torch.norm(t1 - t2, dim=1))
dis_s = torch.mean(torch.norm(s1 - s2, dim=1))

return dis_r + dis_t + dis_s

Both r1 and r2 are tensors with shape b33. Therefore, should dis_r = torch.mean(torch.norm(r1 - r2, dim=1)) be modified to dis_r = torch.mean(torch.norm(r1 - r2, dim=(1,2)))?

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