Giter VIP home page Giter VIP logo

Comments (5)

nzc avatar nzc commented on August 12, 2024

The x_l's size should be batch_size * [field_size * embedding_size],in DCN paper,x_l's size should be [filed_sizeembedding], so result of x_0x_l^T is rank-one. Thinking of expanding to batch_size [field_sizeembedding_size], the result's size should be batch_size1. If use torch.matmul(x_0, x_l.t()), the size is wrong.

from dnn_ctr.

nzc avatar nzc commented on August 12, 2024

@jiarenyf

from dnn_ctr.

jiarenyf avatar jiarenyf commented on August 12, 2024

The shapes of x0, xl, wl, bl are all [fieldSzie*embeddingSize, 1] (ignoring the batch_axis), and the formulation of xl should be xl = matmul(matmul(x0, xl.T), wl) + bl + xl, as shown in the following image:
image ...

I am not familiar with pytorch, but in mxnet I use batch_dot to implement the calculation of xl, as in here ...

from dnn_ctr.

nzc avatar nzc commented on August 12, 2024

@jiarenyf The x_0 in my code is two-dimension . And I do the same thing as batch_dot in my code

from dnn_ctr.

jiarenyf avatar jiarenyf commented on August 12, 2024

But the result of x0*xl^T is not rank-one, it should be [batchSize, fieldSize*embeddingSize, fieldSize*embeddingSize], and the shape of x0*xl^T*wl is [batchSize, fieldSize*embeddingSize] ... Here I use * to represent matmul ...

from dnn_ctr.

Related Issues (18)

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.