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

Generate the new data_img.h5 from prepro_img_pool5.lua #12

Closed
loripandka opened this issue Oct 13, 2017 · 10 comments
Closed

Generate the new data_img.h5 from prepro_img_pool5.lua #12

loripandka opened this issue Oct 13, 2017 · 10 comments

Comments

@loripandka
Copy link

Hi. The new data_img.h5 file generated from prepro_img_pool5.lua seems to be missing. Please could you upload it? I have limited computational resources and cannot generate it myself.

Thank you in advance.

Lori

@ayshrv
Copy link
Member

ayshrv commented Oct 15, 2017

Hi @loripandka , you can find data_img_pool5.h uploaded at this link: https://drive.google.com/open?id=0B-iGspODhEtrUXg5dXV5TlRJUmM (deprecated link). I hope it helps.

@loripandka
Copy link
Author

Thank you @interritus1996! I see that the size of the file is 46GB. The previous file was just 1,9 GB. Is this file size correct? If yes, does the new model require higher hardware specs in order to be executed because I'm concerned about my limited resources? I have executed the first model on an NVidia Jetson TX1 (4GB RAM) by lowering batch size because otherwise I would get segfault.

Thank you

@ayshrv
Copy link
Member

ayshrv commented Oct 15, 2017

Hi @loripandka ,
Yes, the size of the file is correct. Previously, data_img.h5 had 4096 features for each image. This file data_img_pool5.h5 contains 14x14x512 (=100352) features for each image, which would give around 100352/4096 = 24.5 times the size of previous file.

I think you will be able to use this model on your GPU. I ran the code using data_img_pool5.h5 while keeping batchSize to 4 and it required around 3.1 GB GPU memory.

@loripandka
Copy link
Author

@interritus1996 I downloaded and tested it. It seems to work fine. Thanks for the help :)

@loripandka
Copy link
Author

loripandka commented Oct 22, 2017

Hello @interritus1996. I was using the old hdf5 file when referring to my previous response, but now that I'm using the correct hdf5 file "data_img_pool5.h5" I'm getting the following error although I'm testing with different parameters and setting them to the minimum value like "th train.lua -encoder mn-att-ques-im-hist -decoder gen -gpuid 0 -rnnHiddenSize 10 -batchSize 1 -maxHistoryLen 10 -numEpochs 4 -backend cudnn".
The error is:

/root/torch/install/bin/luajit: /root/torch/install/share/lua/5.1/hdf5/dataset.lua:71: $ Torch: not enough memory: you tried to allocate 30GB. Buy new RAM! at /root/torch/pkg/torch/lib/TH/THGeneral.c:270
stack traceback:
    [C]: in function 'resize'
    /root/torch/install/share/lua/5.1/hdf5/dataset.lua:71: in function 'all'
    dataloader.lua:54: in function 'initialize'
    train.lua:18: in main chunk
    [C]: in function 'dofile'
    /root/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
    [C]: at 0x004061f0

Do you have any idea how to solve this issue? On NVidia Jetson TX1 it is impossible to increase RAM.

Thanks

@ayshrv
Copy link
Member

ayshrv commented Oct 25, 2017

Unfortunately, you won't be able to load data_img_pool.h5 without increasing the RAM as it needs to load the 47 GB file into RAM before proceeding.

@loripandka
Copy link
Author

Is there a way to load the file partially into RAM?

@abhshkdz
Copy link
Member

abhshkdz commented Jan 1, 2018

Although it's beyond the scope of this codebase, an alternative to pre-extracting and loading image features would be to plug in the CNN during training and do a forward pass from images through the CNN through the VisDial model. That would require significantly lesser memory but will take longer to train.

@abhshkdz abhshkdz closed this as completed Jan 1, 2018
@iAppCloudSolutions
Copy link

Hi @loripandka , you can find data_img_pool5.h uploaded at this link: https://drive.google.com/open?id=0B-iGspODhEtrUXg5dXV5TlRJUmM (deprecated link). I hope it helps.

@iAppCloudSolutions
Copy link

Hi..Above link require permission..Can you share data_img.h5 file with me?
Thank you in advance

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

4 participants