batra-mlp-lab / visdial

[CVPR 2017] Torch code for Visual Dialog

Home Page:https://arxiv.org/abs/1611.08669

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generate the new data_img.h5 from prepro_img_pool5.lua

loripandka opened this issue · comments

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

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.

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

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.

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

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

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.

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

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.

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.

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