Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

ResNeXT OOM Error #3

Closed
ysharma1126 opened this issue Feb 11, 2019 · 7 comments
Closed

ResNeXT OOM Error #3

ysharma1126 opened this issue Feb 11, 2019 · 7 comments

Comments

@ysharma1126
Copy link

Get OOM error evaluating ResNeXT model even with batch size = 10

@ppwwyyxx
Copy link
Contributor

Then perhaps you need to use a smaller batch size.

@ysharma1126
Copy link
Author

I am using a GTX 1080 Ti, and was told your CAAD 2018 submission used a batch size of 20. Given that, I am wondering why the batch size needs to be reduced that significantly.

@ppwwyyxx
Copy link
Contributor

It's best to paste your command so we know what you did.
Are you using the --eval-directory flag for main.py? If that's the case you actually need to modify the code to change its batch size.

ppwwyyxx added a commit that referenced this issue Feb 11, 2019
@ysharma1126
Copy link
Author

I am performing white-box evaluation on a single GPU. Note that I do not have trouble with the default batch size of 32 when evaluating R152. For ResNeXT, manually reducing the batch size to 10 still yields OOM errors.

python main.py --eval --load X101-DenoiseAll.npz --data [ImageNet_Dir] --attack-iter 1 --attack-epsilon 16.0 --arch ResNeXtDenoiseAll -d 101

@ppwwyyxx
Copy link
Contributor

In the CAAD submission, only forward pass is needed so the memory requirement there is very minimal.

On a GPU with 16G memory I can run your command with 32 batch size while seeing some OOM messages (which did not affect the evaluation).

@ysharma1126
Copy link
Author

Understood, my evaluation is terminated due to ResourceExhaustedError. I will reduce the batch size further. Thanks.

@ppwwyyxx
Copy link
Contributor

I grabbed a 1080Ti with 10.4G free memory and I was able to execute your command with batch size 15.

It's probably just an environment issue.

I'm on TF1.13.0rc1, cuda10, cudnn7.4.24, if that matters.

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

No branches or pull requests

2 participants