show-attend-and-tell
show-attend-and-tell copied to clipboard
MemoryError when train the model
MemoryError when train the model, I want to know how large the memory does the model need if I train the model, thx
Have you solved this problem?
I have got the memory error while trying to train the model. Is there a solution to it ? anyone please ?
Traceback (most recent call last):
File "/media/aafaq/Data/PycharmProjects/show-attend-and-tell/train.py", line 25, in
File "/media/aafaq/Data/PycharmProjects/show-attend-and-tell/train.py", line 8, in main word_to_idx = data['word_to_idx'] File "/media/aafaq/Data/PycharmProjects/show-attend-and-tell/core/utils.py", line 13, in load_coco_data data['features'] = hickle.load(os.path.join(data_path, '%s.features.hkl' %split)) File "/usr/local/lib/python2.7/dist-packages/hickle.py", line 624, in load py_container = _load(py_container, h_root_group) File "/usr/local/lib/python2.7/dist-packages/hickle.py", line 749, in _load py_subcontainer = _load(py_subcontainer, h_node) File "/usr/local/lib/python2.7/dist-packages/hickle.py", line 756, in _load subdata = load_dataset(h_group) File "/usr/local/lib/python2.7/dist-packages/hickle.py", line 662, in load_dataset return np.array(data) MemoryError
Anyone else encountered this ?
Do you have enough RAM (or virtual memory)?
I have 32GB RAM and 12GB GPU. available memory is around 28GB. But one file size is around 33.1 GB. Were you able to reproduce the results. Any idea whats wrong. Thanks
@nayyeraafaq Did you solve memory error?? how did you solve this problem?
reduce the batch size
Reduce batch size does not work. You can increase the swap space if you work in Linux.
Reduce batch size does not work. You can increase the swap space if you work in Linux.
Same issue and your suggestion worked for me. Follow this link to add up your swap space. https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04