happynear / FaceVerification

An Experimental Implementation of Face Verification, 96.8% on LFW.
447 stars 234 forks source link

Final layers for contrastive loss #75

Closed panicooo closed 6 years ago

panicooo commented 6 years ago

Hello, I have a quetion didn't understand, is the final layer for face verification and identification is same,?which means the embedding size for contrastive is class nums of identity.

happynear commented 6 years ago

The feature dimension has no relation with the class num. Contrastive loss is applied right after the feature layer, also has no relation with the class num.

panicooo commented 6 years ago

@happynear Thank you! But the deepid 2 modle also has the identification signal, so there are should be softmax layer after the feature layer, so how can I share the feature layers for both softmax and contrastive loss layers, If there are additional train weights map the feature layers to softmax layer?

happynear commented 6 years ago

Yes, add an additional inner-product layer for softmax loss.

panicooo commented 6 years ago

@happynear Okay, thank you very much!