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

About GPU memory #9

Closed
jerryshih1106 opened this issue Apr 6, 2022 · 2 comments
Closed

About GPU memory #9

jerryshih1106 opened this issue Apr 6, 2022 · 2 comments

Comments

@jerryshih1106
Copy link

Hi,

I try to test features on cifarfs by this command:
"""
$ python main.py --dataset-path "" --dataset cifarfs --model resnet12 --test-features "[/AS1.pt11, /AS2.pt11, /AS3.pt11]" --preprocessing ME --n-shots 1
"""
and it output "RuntimeError: CUDA out of memory".

I am using 3080 GPU with 8GB memory.
I also tried colab and got the same problem.
May I know how to fix it?

Thanks

@ybendou
Copy link
Owner

ybendou commented Apr 13, 2022

Hi,

Sorry for the late response.
It is probably due to small GPU memory. We have added a new version with a parameter --batch-fswhich controls the batch size during few shot evaluation. Can you do a pull then try to run the script with the new parameter :
$ python main.py --dataset-path "" --dataset cifarfs --model resnet12 --test-features "[/AS1.pt11, /AS2.pt11, /AS3.pt11]" --preprocessing ME --n-shots 1 --batch-fs 20
Default value was 100, I just pushed a new version with default value as 20. If it's still not working, can you try to reduce it even more?

Best,

@ybendou ybendou reopened this Apr 13, 2022
@jerryshih1106
Copy link
Author

It works!
Thank you very much.

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

2 participants