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 to calculate diff in loss layer #2

Closed
xiaoyuliu opened this issue Sep 7, 2016 · 2 comments
Closed

how to calculate diff in loss layer #2

xiaoyuliu opened this issue Sep 7, 2016 · 2 comments

Comments

@xiaoyuliu
Copy link

Hi,

I tried to implement the loss layer using python you mentioned in the paper (eq(11)), however I have no idea how the diff should look like, because usually there will be three diffs for anchors/positives/negatives. Can you please provide the sample using only feats and labels as inputs?

Thanks!

@jwyang
Copy link
Owner

jwyang commented Sep 7, 2016

Hi, @codingsmallfish

At line 429 in train.lua, I used organize_samples() function to organize triplets given the feats and labels. The outputs are triplet and triplet index for eq(11). You can take the function organize_samples function as a reference if you plan to reimplement by python.

please let me know if you have concerns.

thanks,
Jianwei

@xiaoyuliu
Copy link
Author

Hi, @jwyang

Thank you pretty much!

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