THUDM / ComiRec

Source code and dataset for KDD 2020 paper "Controllable Multi-Interest Framework for Recommendation"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

关于attention-weight的计算

wutengcoding opened this issue · comments

大佬, 请问在model.py里计算softmax的时候,为什么要先计算tf.exp(x,1)呢, tf.exp(x,1) 不就刚好是x

@wutengcoding 你好,你指的具体是哪行?

@wutengcoding 你好,你指的具体是哪行?

model.py 178以及244行, tf.pow(x, 1)

@wutengcoding 你好,这个是历史遗留产物,确实可以去掉。当时是想尝试tf.pow(x, p), 0<p<1的情况才写了这个。

@wutengcoding 你好,这个是历史遗留产物,确实可以去掉。当时是想尝试tf.pow(x, p), 0<p<1的情况才写了这个。

了解了. 谢谢