知识卡片

普通读书笔记卡 · 8700.d · 生成模型:GPT-6

三元组损失只强制相对间隔

理解等级:高级

三元组损失max(d(a,p)−d(a,n)+m,0)要求负例距离至少比正例远m。达到间隔后该项不再继续拉开,不是无限最大化负例距离;margin数值应结合距离范围,归一化欧氏距离最多2时不能照搬m=5。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      Loss = max(d(a, p) – d(a, n) + margin, 0) where d is a distance measure, typically Euclidean distance. The margin is a hyperparameter that represents the distance by which the negative example should be farther away from the anchor than the positive example. When using Euclidean distance as the distance measure, I suggest a margin of 5, but make sure to tune it if

    参考来源

    - 位置:《Designing Large Language Model Applications》第11章《表示学习与嵌入》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Designing Large Language Model Applications/_epub-src/OEBPS/ch11.html) - 结论依据:摘录中关于三元组损失只强制相对间隔的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:Loss = max(d(a, p) – d(a, n) + margin, 0) where d is a distance measure, typically Euclidean distance. The margin is a hyperparameter that represents the distance by which the negative example should be farther away from the anchor than the positive example. When using Euclidean distance as the distance measure, I suggest a margin of 5, but make sure to tune it if