Git Product home page Git Product logo

srvcodes / continual_learning_with_vit Goto Github PK

View Code? Open in Web Editor NEW
19.0 19.0 4.0 28.29 MB

Code for our CVPR 2022 workshop paper "Towards Exemplar-Free Continual Learning in Vision Transformers"

Home Page: https://arxiv.org/pdf/2203.13167.pdf

License: MIT License

Python 92.11% Jupyter Notebook 4.79% Shell 3.10%
computer-vision continual-learning cvpr2022 incremental-learning transformers vision-transformer

continual_learning_with_vit's People

Contributors

srvcodes avatar

Stargazers

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

Watchers

 avatar

continual_learning_with_vit's Issues

Missing BN and ReLU in ConvStem?

Hey,
thank you for the nice implementation!

I was mostly interested in the EarlyConvViT. By comparing against the paper for my experiment I notices that when preparing the prepending conv block like this:

 self.conv_layers = nn.Sequential(
            *[nn.Sequential(
                nn.Conv2d(in_channels=n_filter_list[i],
                          out_channels=n_filter_list[i + 1],
                          kernel_size=3,  # hardcoding for now because that's what the paper used
                          stride=2,  # hardcoding for now because that's what the paper used
                          padding=1),  # hardcoding for now because that's what the paper used
            )
                for i in range(len(n_filter_list)-1)
            ])

there should be batch norms and relus added like this:

self.conv_layers = nn.Sequential(
            *[nn.Sequential
                (
                    nn.Conv2d(in_channels=n_filter_list[i],
                            out_channels=n_filter_list[i + 1],
                            kernel_size=3,  # hardcoding for now because that's what the paper used
                            stride=2,  # hardcoding for now because that's what the paper used
                            padding=1),  # hardcoding for now because that's what the paper used
                    nn.BatchNorm2d(n_filter_list[i + 1]),
                    nn.ReLU(inplace=True)
                )
                for i in range(len(n_filter_list)-1)
            ])

right?

Spatial vs height

Hello, thank you for your great work.

In your code and your paper, you mentioned that spatial (summing width and height separately) shows better result, ensuring plasticity. However, summing in width way makes 1.0 in all vector since we apply softmax function at attention map. Thus, calculating difference between the two different map w.r.t to width way would only make zero value.
Therefore, I'm curious why you are using spatial method.
It seems that your code uses "height" configuration, and I think you are aware of it. Does I have misunderstanding of your paper?
Thank you!

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.