Giter Site home page Giter Site logo

code mismatch with the theory about cvt HOT 10 OPEN

microsoft avatar microsoft commented on July 4, 2024
code mismatch with the theory

from cvt.

Comments (10)

basavaraj-hampiholi avatar basavaraj-hampiholi commented on July 4, 2024 2

Hi @diaodeyi ,
In the present code, get_cls_model function is called by the registry.py. You can use build_model in build.py to call the model. Otherwise, you can remove the registry and directly call get_cls_model function. Both way should work

Good luck..

from cvt.

askerlee avatar askerlee commented on July 4, 2024

This is after conv_proj_q, conv_proj_k and conv_proj_v. But I'm not sure why the authors still use the pointwise projections after the conv projections.

from cvt.

basavaraj-hampiholi avatar basavaraj-hampiholi commented on July 4, 2024

@askerlee, I think it is part of depthwise separable convolutions. Depthwise convolutions followed by pointwise projections.

from cvt.

diaodeyi avatar diaodeyi commented on July 4, 2024

I want to know the code how to call the get_cls_model function in the cls_cvt.py

from cvt.

diaodeyi avatar diaodeyi commented on July 4, 2024

By the way , theself.proj = nn.Linear(dim_out, dim_out)Means FFN only projection with same dimension?

from cvt.

basavaraj-hampiholi avatar basavaraj-hampiholi commented on July 4, 2024

@diaodeyi It's the single linear layer (with the same in/out dimension) right after the attention calculation. The FFN in this code is class MLP (line 53).

from cvt.

diaodeyi avatar diaodeyi commented on July 4, 2024

Thanks, there are so many linear projections that aren't be mentioned by paper.

from cvt.

basavaraj-hampiholi avatar basavaraj-hampiholi commented on July 4, 2024

@diaodeyi Yes. I think they have left them out with the presumption that the reader has a prior good understanding of basic transformer architecture.

from cvt.

diaodeyi avatar diaodeyi commented on July 4, 2024

@askerlee, I think it is part of depthwise separable convolutions. Depthwise convolutions followed by pointwise projections.

No, I think the proj_q\k\v are exactly the things the paper does not mention.

from cvt.

Markin-Wang avatar Markin-Wang commented on July 4, 2024

@askerlee, I think it is part of depthwise separable convolutions. Depthwise convolutions followed by pointwise projections.

No, I think the proj_q\k\v are exactly the things the paper does not mention.

Hi, the seperable depth conv contains two parts: depth-wise conv and point-wise conv. The author implemented the point-wise conv via the linear layer, maybe because it's convenience for the ablation study. The only difference between them is the bias term.

from cvt.

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.