keras-io
keras-io copied to clipboard
fixed training bugs in siamese network example
trafficstars
There were some training and inference bugs in siamese network with triplet loss example, the bugs were the following:
- In
train_stepwe should passtraining=True. - In the
test_stepwe should passtraining=False. - In inference we should pass each example to the
CosineSimilaritymetric because passing multiple example will compute the average and we want the similarity per example. EarlyStoppingshould be used to get better accuracy.