model.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:DeepSEA 作者: momeara 项目源码 文件源码
def build_triple_score_network(distance_to_plus, distance_to_minus, model_params):
    """
    Compute the hinge loss triple loss from (Wang, CVPR2014)

    The hinge loss is a convex approximation to the 0-1 ranking error
    loss, which measures the model's violation of the ranking order
    specified in the triplet.

    The score_gap parameter favors a gap between the distance of the two image pairs
    """

    triple_score = tf.nn.relu(tf.add(
        model_params['score_gap'],
        tf.sub(distance_to_plus, distance_to_minus)),
        name="triple_score")

    return triple_score
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号