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

CpasNet on 227*227 data and 196 classes #21

Open
tethys0221 opened this issue Mar 21, 2018 · 1 comment
Open

CpasNet on 227*227 data and 196 classes #21

tethys0221 opened this issue Mar 21, 2018 · 1 comment

Comments

@tethys0221
Copy link

I'm trying to train this with images that are 227*227 and have 196 types. I wrote my own load_data() but when training, error "Resource exhausted, OOM when allocating tensor with shape [128,3872,196,16,1]" occurs. (128 is batch size)

@AlLongley
Copy link

AlLongley commented Mar 22, 2018

This implementation of CapsNet (If not every other as well) is quite heavy in terms of memory overhead for weights/optimizer gradients.

You're supplying a 128 x 3872 x 196 x16 element batch input, as float32 values would take about 6.2 GB of memory, considering optimizer overhead I could see that being some multiple of that.

Does it run with a batch size of 1? Try 10 and see what difference it makes in memory usage, and work out your highest usable batch size like that

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