欧式距离满足三角形不等式。如果我们计算欧几里得距离,然后按如下所示将其传递给多层感知器,
vector = Lambda(lambda x: tf.reduce_sum(tf.squared_difference(x[0], x[1]), axis=1, keepdims=True))(
[book, word])
# MLP layers
for idx in range(1, num_layer):
layer = Dense(layers[idx], activation='relu', name='layer%d' % idx)
vector = layer(vector)
output = Dense(1, activation='sigmoid', kernel_initializer=initializers.lecun_normal())(vector)
现在我的问题是,通过MLP后,它是否仍将满足三角不等式? 如果是,请提供证明,参考或定理。