Training a Siamese Similarity Measure