Skip to content

FastLSTM out of memory error #1316

Description

@tastyminerals

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions