Fix typo in siamese example
@@ -43,9 +43,9 @@ def contrastive_loss(y_true, y_pred):
http://yann.lecun.com/exdb/publis/pdf/hadsell-chopra-lecun-06.pdf
'''
margin = 1
- sqaure_pred = K.square(y_pred)
+ square_pred = K.square(y_pred)
margin_square = K.square(K.maximum(margin - y_pred, 0))
- return K.mean(y_true * sqaure_pred + (1 - y_true) * margin_square)
+ return K.mean(y_true * square_pred + (1 - y_true) * margin_square)
def create_pairs(x, digit_indices):
