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

FastLSTM out of memory error #1316

Open
tastyminerals opened this Issue Jun 3, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@tastyminerals
Contributor

tastyminerals commented Jun 3, 2018

Training a simple recurrent network with 200 hidden units using nn.RecGRU module works without issues. However, once I replace nn.RecGRU with nn.FastLSTM I am getting the following error:

Epoch #1	
training...	
THCudaCheck FAIL file=/home/pavel/torch/extra/cutorch/lib/THC/generic/THCStorage.cu line=66 error=2 : out of memory
/home/pavel/torch/install/bin/luajit: /home/pavel/torch/install/share/lua/5.1/nn/Container.lua:67: 
In 4 module of nn.Sequential:
In 1 module of nn.Sequential:
/home/pavel/torch/install/share/lua/5.1/torch/File.lua:351: cuda runtime error (2) : out of memory at /home/pavel/torch/extra/cutorch/lib/THC/generic/THCStorage.cu:66

Obviously this cannot be simply due to lack of GPU memory because I have 12GB and the network itself is small.

Basically all I change is the following line:
local rnn = nn.RecGRU(opt.inputsize, opt.hiddensize[1])
with
local rnn = nn.FastLSTM(opt.inputsize, opt.hiddensize[1], nil, nil, nil, true, opt.dropout/2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment