Code Monkey home page Code Monkey logo

Comments (5)

chongminggao avatar chongminggao commented on June 6, 2024

补充疑问: 新建这个DNN是否该放进build()里,而非在call()里?

from deepctr.

shenweichen avatar shenweichen commented on June 6, 2024

是共享的,是我忘记把build里的self.dnn用在这里了
不过目前写在call里实际执行的时候并不会多次新建,对结果是没有影响的~

from deepctr.

xu-song avatar xu-song commented on June 6, 2024

补充两个LAU的疑问

concat

att_input = tf.concat(
[queries, keys, queries - keys, queries * keys], axis=-1)
att_out = self.dnn(att_input, training=training)

请问这里concat的操作是paper里写的吗?paper里好像没体现 q-k

image

softmax

另外,paper里说不需要softmax,是吧?这里为什么默认 self.weight_normalization=true

if self.weight_normalization:
outputs = softmax(outputs)
if not self.return_score:
outputs = tf.matmul(outputs, keys)

from deepctr.

zanshuxun avatar zanshuxun commented on June 6, 2024

@xu-song 这两个地方的实现是与DIN作者的开源代码对齐了,与论文中的表述确实不同。具体为什么这样实现,有什么trick,可能还是得去问一下原作者

concat

concat里加入q-k、q*k,论文里没有体现,是作者开源代码里的实现
https://github.com/zhougr1993/DeepInterestNetwork/blob/9765f96202f849e59ff260c8b46931a0ddf01d77/din/model.py#L209

softmax

论文中说不需要限制和为1,但代码里是做了softmax
https://github.com/zhougr1993/DeepInterestNetwork/blob/9765f96202f849e59ff260c8b46931a0ddf01d77/din/model.py#L225

from deepctr.

xu-song avatar xu-song commented on June 6, 2024

感谢

from deepctr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.