sh1doy / summarization_tf

Implementation of "Automatic Source Code Summarization with Extended Tree-LSTM"
36 stars 18 forks source link

OOM problem #15

Open ZhichaoOuyang opened 4 years ago

ZhichaoOuyang commented 4 years ago

tensorflow.python.framework.errors_impl.ResourceExhaustedError: OOM when allocating tensor with shape[31130,512] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc [Op:Add] name: E/Initializer/random_uniform/

when I run "python train.py -m multiway -r 0.05 -b 64 -e 100" in two gpu, but it occurs this problem.

So how to solve it?

anshul17024 commented 4 years ago

Hi, I have been trying to run this code.

I parsed the dataset using: java -jar parser.jar -f /Users/agbbps/Desktop/Internship/summarization_tf-master/data/train.json -d /Users/agbbps/Desktop/Internship/summarization_tf-master/data

The above command successfully parsed the json file and output (of around 3GB) was redirected to a new directory X.

Then, I used the command: python dataset.py X

This command has created pickle files, which are empty. Due to this, I am getting the following error: File "/Users/agbbps/Desktop/Internship/summarization_tf-master/train.py", line 78, in module *trn_x, trn_y_raw = zip(sorted(trn_data.items())) ValueError: not enough values to unpack (expected 2, got 0)**

Can someone help me through this? It would be really helpful.