GithubHelp home page GithubHelp logo

How to change the kernel size? about ast HOT 2 CLOSED

ooobsidian avatar ooobsidian commented on August 16, 2024
How to change the kernel size?

from ast.

Comments (2)

YuanGongND avatar YuanGongND commented on August 16, 2024 1

Hi there,

The short answer is no, it is not supported yet in our code, and we do not have a plan to add that feature.

The reason is that when you change the kernel size, you change the patch splitting strategy, e.g., when you set kernel size as (8,8), you are using 8*8 patches rather than 16*16 patches, while the ImageNet pretrained models are pretrained on 16*16 patches. Therefore, the patch splitting layer will complain.

If you don't use ImageNet pertaining, AST should support arbitrary patch sizes, you will at least change this line in addition to the get_shape function. You might need to change other things. But without ImageNet pertaining, the AST performance is not competitive.

Finally, I want to point to our recent work of SSAST, which I hope will be released soon. SSAST uses self-supervised pertaining as a replacement of ImageNet pertaining, which does not constrain the patch size to be 16*16. Nevertheless, in SSAST, we have not tried 8*8 patch either (so no 8*8 pretrained model will be released, you will need to pretrain it by yourself, but that is fully supported) as it is expensive. We do plan to release 128*2 pretrained model.

-Yuan

from ast.

ooobsidian avatar ooobsidian commented on August 16, 2024

Thank you very much for your quick reply, it solved my problem. At the same time, I will continue to follow SSAST.

from ast.

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.