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

Backpropagation for training Siamese nets #1265

Closed
YangXS opened this issue Oct 12, 2014 · 7 comments
Closed

Backpropagation for training Siamese nets #1265

YangXS opened this issue Oct 12, 2014 · 7 comments
Labels

Comments

@YangXS
Copy link

YangXS commented Oct 12, 2014

I find that for training Siamese nets[ref1], a contrastive loss layer was added. No extra code was added for backpropagation in other layers. Is that right? However, according to [ref2] where a similar net was proposed for metric learning, the backpropagation of other layers should also be revised. At least the subtraction of each layer's outputs of the input pair should be added to compute the gradient w.r.t the wieght and bias. If I missed the revision of backpropagation, please help me. Thanks.
[ref1] Sumit Chopra, Raia Hadsell, Yann LeCun. Learning a Similarity Measure Discriminatively with Applications to Face Verification. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), San Diego CA, June 2005.
[ref2] Junlin Hu, Jiwen Lu, Yap-Peng Tan. Discriminative Deep Metric Learning for Face Verification in the Wild. IEEE International Conference on Computer Vision and Pattern Recognition (CVPR), 2014

@YangXS
Copy link
Author

YangXS commented Oct 13, 2014

Sorry for this misunderstanding. The gradients descent method in [ref2] is actually the same as the one implemented for training Siamese nets.

@shelhamer
Copy link
Member

The ContrastiveLossLayer in Caffe is suitable for training siamese networks. If an alternative gradient computation is used in [2], you will need to implement it.

@nemohz
Copy link

nemohz commented Jun 19, 2015

Have you implement Discriminative Deep Metric Learning for Face Verification in the Wild? I try to implement it but I can not achieve the performance of the paper.

@YangXS
Copy link
Author

YangXS commented Jun 19, 2015

Practically, the model proposed in Discriminative Deep Metric Learning for
Face Verification in the Wild (DDML) can be implemented by
the Siamese network of Caffe. I have successfully trained the Siamese
network for my task. Though there may be some differences in
the implementation, such as the DDML do not use the convolution, I think
the Siamese network provided in Caffe is more effective.

2015-06-19 11:23 GMT+08:00 nansea notifications@github.com:

Have you implement Discriminative Deep Metric Learning for Face
Verification in the Wild? I try to implement it but I can not achieve the
performance of the paper.


Reply to this email directly or view it on GitHub
#1265 (comment).

@xuzhm
Copy link

xuzhm commented Jun 22, 2015

@YangXS Hi,I also use Caffe to train the Siamese network for my task, but it seems not converge to a good result, can you help me?

@YangXS
Copy link
Author

YangXS commented Aug 6, 2015

@anxiaoxi45, Could you give more details about your task ? I really spend lots of time to make it work.

@keerthanashanmugam
Copy link

keerthanashanmugam commented Dec 11, 2017

@YangXS Could you provide the model parameters (no of nodes in each of the layers ) which achieves the results (for LBP features for deep and shallow network ) in Discriminative Deep Metric Learning for Face Verification in the Wild (DDML)? And did you normalise the data, if so how.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants