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

How do you calculate loss on training of the Hybrid_ViT heatmap #3

Closed
mucunwuxian opened this issue Apr 28, 2024 · 2 comments
Closed

Comments

@mucunwuxian
Copy link
Contributor

mucunwuxian commented Apr 28, 2024

Thank you for your great work!

I would like to ask.
Especially in the case of authentication based on similarity as in test.py.
image

How do you calculate loss on training?
The distance calculation in test.py was as follows.
Maybe it's not a cosine distance, but is the ArcFace loss function used?

diff = np.subtract(embeddings1, embeddings2)
dist = np.sum(np.square(diff), 1)

Even if it's a rough answer, I appreciate it.
Best regards,

@anguyen8
Copy link
Owner

@mucunwuxian Thank you for your question!

Yes, the ArcFace loss is used during training. Please see the paper (Eq. 7, Sec. 3.2).

@mucunwuxian
Copy link
Contributor Author

mucunwuxian commented May 1, 2024

@anguyen8
Thank you for your reply!
I'll try using the information you provided.👍

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