Closed adriaciurana closed 3 years ago
Try to use SGD instead of Adam.
Could you try to use git biscet to find out which commit introduced the bug? That would be super helpful.
See https://git-scm.com/book/en/v2/Git-Tools-Debugging-with-Git
Thanks a lot!
I am implementing a triplet network and I am producing a rather strange error.
When I do the learning at the end, val_loss is always worth 1 (the margin of the triplet_loss):
To see what happened I have printed the average distances as metric. You can see how each epoch values the distance between positive - anchor and negative - anchor each time they are smaller until they become 0.
The strangest thing is that if I use an environment of Keras 2.1.2 in Python 2, it works perfectly for me.
This is the code of the network that I am using:
And the respective functions that are used:
The strangest thing is that it only happens in the validation stage. I also tried after saving the model by checkpoint and loading it and making a prediction. Does not work returns in all cases the same distance.
Thanks, Adrià
PD: I test with another environ with Python 3 & keras=2.1.2. And works correctly. PD2: The problem I think is in keras higher than 2.1.2, I have tried different versions of tensorflow and it works.