Giter Site home page Giter Site logo

pytorch-implementation-of-mobile-former's People

Contributors

acheun9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pytorch-implementation-of-mobile-former's Issues

some question

class Mobile(nn.Module):
def init(self, ks, inp, hid, out, se, stride, dim, reduction=4, k=2):

hi, call you tell me, the k value why equal to 2, What is it used for

two issues

Great job!
However, I think there are probably two tiny issues in you code.

The first one is in bridge.py(line 24 & line 53). I think there are some differences in the following two lines of code

x = x.reshape(b, c, h*w).transpose(1,2).unsqueeze(1)
x = x.contiguous().view(b, h * w, c).unsqueeze(1)

May be the first line is correct?

The second one is in config.py.Accroding to the original paper, in page 13,

Figure 7. Visualization of cross attention on the two-way bridge: Mobile→Former and Mobile←Former. Mobile-Former-294M is used,which includes 6 tokens (each corresponds to a column) and 11 Mobile-Former blocks (block 2–12) across 4 stages. Each block has two attention heads that are visualized in two rows. Attention in Mobile→Former (left half) is normalized over pixels, showing the focused region per token. Attention in Mobile←Former (right half) is normalized over tokens showing the contribution per token at each pixel.

But in config.py, there are some stages with only one head.

I'm not sure whether the above is correct. Looking forward to your reply!

Preweights?

Hi, I want to extend the model on my own task, will you release pre-trained weights?

Model

您好,问一下,这个实现中关于transformer的部分是没有考虑位置编码吗?

配置

请问作者是什么电脑配置跑这个模型的啊,2080ti能带动吗?

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.