google_tt模型中batch_softmax疑问
Closed this issue · 2 comments
Andy1314Chen commented
def corrected_batch_softmax(x, y, sampling_p=None):
"""logQ correction softmax"""
correct_inner_product = log_q(x, y, sampling_p=sampling_p)
return tf.math.exp(correct_inner_product) / tf.math.reduce_sum(tf.math.exp(correct_inner_product))
这里softmax计算的是不是有些问题呢?
原论文:
中分母是x_i与batch内不同y_j点乘的和, 而代码中分母是batch内x_i与y_i点乘的和
GrogusBall commented
相关实现确实有问题,多谢支持~
v0.1.0版本的google_tt已经不在维护,请关注v1.1.x版本~
双塔实验,请参考Demo实验:
https://github.com/LongmaoTeamTf/deep_recommenders/blob/master/experiments/deep_retrieval.ipynb
Andy1314Chen commented
相关实现确实有问题,多谢支持~
v0.1.0版本的google_tt已经不在维护,请关注v1.1.x版本~
双塔实验,请参考Demo实验:
https://github.com/LongmaoTeamTf/deep_recommenders/blob/master/experiments/deep_retrieval.ipynb
感谢回复~