iShohei220 / torch-gqn

PyTorch Implementation of Generative Query Network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GPU memory consumption too high?

jenspetersen opened this issue · comments

Hey, thanks for implementing GQN in PyTorch! I can only fit batches of size 8 on my Titan Xp (12GB), is that the same for you, or can you fit the default size of 36? In my own implementation I can manage a batch size of 36, but the results don't look too good, so I wanted to try your version :D

Best,
Jens

Hi!

As you said, this implementation needs very very high computational power because of enormous number of parameters.
This implementation is based on the advice from Dr. Ali Eslami, the first author of GQN paper, so the setting of hyperparameters is absolutely the same as the one on the original paper.
If you have only limited GPU memory, I recommend to use the option of --shared_core True (default: False) or --layers 8 (default: 12) in train.py in order to reduce the number of parameters.
Although the setting would be different with the original paper, you can get enough results as far as I have experimented.

Thank you.

Hi, yes, I totally missed that this uses separate cores by default. Thanks!