Open justshot opened 5 years ago
I changed my code with below update and solved previous problem. However, not a new error message.
Code: AM_softmax_logits = Dense_with_AMsoftmax_loss(2, m=0.2, scale=24)
Error: AttributeError: 'Dense_with_AMsoftmax_loss' object has no attribute 'logits'
In the code of class Dense_with_Center_loss(Layer):I think you don't use the softmax activation, however, your code is: crossentropy = K.sparse_categorical_crossentropy(y_true, y_pred, from_logits=True) Why 'from_logits' is True instead of False? Thank you!
I cloned this project and imported to my own python code. I updated my code as below: siamese_net.compile(loss="AM-softmax",optimizer=optimizer, metrics=['accuracy'])
However, I got below error message: ValueError: Unknown loss function:AM-softmax