Hi.
I am following this tutorial from the keras.io website: https://keras.io/examples/mnist_siamese/.
I am replacing the contrastive_loss as specified there with tfa.losses.ConstrastiveLoss and I am not getting consistent results (in particular, the results are random). I think I have matched the requirements of ConstrastiveLoss. Here's the notebook that reproduces this issue.
Thanks in advance for your help.
@sayakpaul Thanks for reporting it. That is definitely a random behavior. We will look into it
@AakashKumarNain I can take a look at this if no one else is already working on it.
That'd be great thanks @henry-eigen! Please let us know your findings, and also be sure to comment in the thread if for some reason you can't work on the issue anymore.
@sayakpaul @seanpmorgan I think this issue may have already been fixed. I was able to replicate the issue using tfa version 0.8.3, as is used in the notebook, or version 0.9.1, the newest version available through pip. Building from the master branch, however, I got the expected behavior. I think it was this commit from a little over a week ago that fixed it.
Thanks @henry-eigen for looking into it. @sayakpaul if you can please confirm this, we will close the issue. I looked into the code as well and on the first look, I didn't find any bug.
Apologies for the late reply. Seems like the solution for now is to install tfa from source. I will check it and report back accordingly. As @henry-eigen already checked it (thanks for that :)) I think we can close the issue.
Point noted. Will get back :)
Most helpful comment
Apologies for the late reply. Seems like the solution for now is to install tfa from source. I will check it and report back accordingly. As @henry-eigen already checked it (thanks for that :)) I think we can close the issue.