GithubHelp home page GithubHelp logo

Comments (5)

prismformore avatar prismformore commented on May 28, 2024

I don't think window attention in Swin block requires square input. We can still use the pre-trained weights.
https://github.com/microsoft/Swin-Transformer/blob/968e6b5e428186dc99d19166996439c23dccc4d1/models/swin_transformer.py#L77

from multi-task-transformer.

Rockyman-star avatar Rockyman-star commented on May 28, 2024

Okay! Thanks for your reminder. I guess you modified all the window_size to a tuple/list form in the original swin_transformer.py to an uneven height-width partition. But how did you use officially released pretrained parameters relative_position_bias_table as the shape changes? By bilinear interpolation? And what size is the window_size set to? (14, 18) to main the same receptive field? or (7, 9)?

from multi-task-transformer.

prismformore avatar prismformore commented on May 28, 2024

I didn't change the window size so relative_position_bias_table here is not changed. Window size is independent from the input size.

from multi-task-transformer.

prismformore avatar prismformore commented on May 28, 2024

from multi-task-transformer.

Rockyman-star avatar Rockyman-star commented on May 28, 2024

You may check the swin transformer code here https://github.com/prismformore/Multi-Task-Transformer/blob/main/TaskPrompter/models/transformers/taskprompter_swin.py Get Outlook for Androidhttps://aka.ms/AAb9ysg

________________________________ From: samuel-zhaoy @.> Sent: Wednesday, April 10, 2024 10:34:49 PM To: prismformore/Multi-Task-Transformer @.> Cc: Hanrong Ye @.>; Comment @.> Subject: Re: [prismformore/Multi-Task-Transformer] How does the swin transformer deal with the input image with the size of 448 x 576 ? (Issue #29) Okay! Thanks for your reminder. I guess you modified all the window_size to a tuple/list form in the original swin_transformer.py to an uneven height-width partition. But how did you use officially released pretrained parameters relative_position_bias_tablehttps://github.com/microsoft/Swin-Transformer/blob/968e6b5e428186dc99d19166996439c23dccc4d1/models/swin_transformer.py#L101 as the shape changes? By bilinear interpolation? And what size is the window_size set to? (14, 18) to main the same receptive field? or (7, 9)? — Reply to this email directly, view it on GitHub<#29 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADLPY6XIHS3255SU2LAOJSLY4YOHTAVCNFSM6AAAAABF7XJOWOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBYHE2TOMBTGE. You are receiving this because you commented.Message ID: @.***>

Ok, thanks. I find that you pad the image to the shape which can be divisible by window_size.

from multi-task-transformer.

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.