sujitpal / holiday-similarity

Finding similar images in the Holidays dataset
Apache License 2.0
103 stars 48 forks source link

Regarding code correction #3

Open shravankgit opened 6 years ago

shravankgit commented 6 years ago
def cosine_distance(vecs, normalize=False):
    x, y = vecs
    if normalize:
        x = K.l2_normalize(x, axis=0)
        y = K.l2_normalize(x, axis=0)
    return K.prod(K.stack([x, y], axis=1), axis=1)

In the this line y = K.l2_normalize(x, axis=0), "l2_normalize" function argument is it y or x itself

Please give me reply asap

shravankgit commented 6 years ago

In this file https://github.com/sujitpal/holiday-similarity/blob/master/src/02-holidays-siamese-network.ipynb