Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How much memory is needed to run the example? #66

Open
neuzyy opened this issue Jun 12, 2022 · 4 comments
Open

How much memory is needed to run the example? #66

neuzyy opened this issue Jun 12, 2022 · 4 comments

Comments

@neuzyy
Copy link

neuzyy commented Jun 12, 2022

i run inference example on a 2080ti,but out of memory

@lfxx
Copy link

lfxx commented Jun 16, 2022

Same issue here

@mli0603
Copy link
Owner

mli0603 commented Jun 16, 2022

Hi @lfxx @neuzyy,

The STTR builds a full resolution feature so it can sparsely sample the feature at different stride as discussed in Sec 3.5. This unfortunately, together with attention mechanism, requires a large memory. To avoid this, there are two ways

  • Set the stride higher. By default it is 3, you can set it to 4 and see.
  • Another way, which is more recommended, is lightweight STTR as discussed in Appendix H. Remember to checkout the sttr-light branch to use the code.

Let me know if you have more issues!

@lfxx
Copy link

lfxx commented Jun 17, 2022

Hi @lfxx @neuzyy,

The STTR builds a full resolution feature so it can sparsely sample the feature at different stride as discussed in Sec 3.5. This unfortunately, together with attention mechanism, requires a large memory. To avoid this, there are two ways

  • Set the stride higher. By default it is 3, you can set it to 4 and see.
  • Another way, which is more recommended, is lightweight STTR as discussed in Appendix H. Remember to checkout the sttr-light branch to use the code.

Let me know if you have more issues!

Thanks for your kindly reply.Now i have quite large pictures such as 1920*1080,Even if i use sttr-light model,i still get OOM error on GTX2080TI.Any suggestions such as resize the picture to a smaller size?

@mli0603
Copy link
Owner

mli0603 commented Jun 18, 2022

Hi @lfxx

Yes, downsampling will definitely help. A 2x downsampling will cut the memory consumption by more than 4 times.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants