How to use the margin_fully_connected?
Opened this issue · 1 comments
Hi,
I'm really grateful that you share the TF code.
In the file parallel.py, the fully_connected layer is used before the loss layer, then the softmax loss and regularization_loss are calculated in the loss_function. I don't find where the margin_fully_connected be used.
But when I use margin_fully_connected instead of fully_connected, it doesn't work.
Thanks in advance!
Thanks for your concern.
The interface of margin_fully_connected layer is slightly different from that of fully_connected. Besides the params where fully_connected needs, you still need to provide labels corresponding to input features, global_step of your training process, and other hyperparameters for A-softmax loss.
The interface for margin_fully_connected is defined in
I will open a new branch to implement the complete pipeline soon.