Closed lightislost closed 1 year ago
Please provide a clear and concise description of what the question is.
https://github.com/shibing624/text2vec/blob/a1ba1df243755167622a148de0aae46972d203b7/text2vec/cosent_model.py#L150C1-L150C46 CODE: y_pred = y_pred - (1 - y_true) * 1e12
这里 y_pred 减去 后面 (1-y_true) 的含义是什么呀?
我看y_pred是所有两两向量之间的余弦值,那我理解loss接下来应该只用选出负例-正例的向量差项就可以了吧?为什么是减去 后面 (1-y_true) 呢?
望解惑
Describe the Question
Please provide a clear and concise description of what the question is.
https://github.com/shibing624/text2vec/blob/a1ba1df243755167622a148de0aae46972d203b7/text2vec/cosent_model.py#L150C1-L150C46 CODE: y_pred = y_pred - (1 - y_true) * 1e12
这里 y_pred 减去 后面 (1-y_true) 的含义是什么呀?
我看y_pred是所有两两向量之间的余弦值,那我理解loss接下来应该只用选出负例-正例的向量差项就可以了吧?为什么是减去 后面 (1-y_true) 呢?
望解惑