jnhwkim/ban-vqa

Memory error

michaal94 opened this issue · 1 comments

Hi, I am tring to run your repository, but I keep getting the following error:

Namespace(batch_size=128, epochs=13, gamma=8, input=None, model='ban', num_hid=1280, op='c', output='saved_models/ban', seed=1204, tfidf=True, use_both=False, use_vg=False)
loading dictionary from data/dictionary.pkl
loading features from h5 file
Traceback (most recent call last):
  File "main.py", line 50, in <module>
    train_dset = VQAFeatureDataset('train', dictionary, adaptive=True)
  File "/home/michas/Desktop/codes/ban-vqa/dataset.py", line 234, in __init__
    self.features = np.array(hf.get('image_features'))
MemoryError

I suppose it is hapenning because of trying to load the whole dataset as a numpy array into RAM (which I have 32GB). Can you suggest any solution?
Thanks

At least you may need 64GB memory.