keras-io icon indicating copy to clipboard operation
keras-io copied to clipboard

fixed training bugs in siamese network example

Open hazemessamm opened this issue 3 years ago • 0 comments
trafficstars

There were some training and inference bugs in siamese network with triplet loss example, the bugs were the following:

  1. In train_step we should pass training=True.
  2. In the test_step we should pass training=False.
  3. In inference we should pass each example to the CosineSimilarity metric because passing multiple example will compute the average and we want the similarity per example.
  4. EarlyStopping should be used to get better accuracy.

hazemessamm avatar Jul 01 '22 22:07 hazemessamm