Skip to content

Error when using dropout in GRU #415

@Trojahn

Description

@Trojahn

The following toy example works:

require 'rnn'

model = nn.Sequential()
model:add(nn.GRU(10, 5, 20))
model:add(nn.GRU(5, 1, 20))
model:add(nn.Sigmoid())
model = nn.Sequencer(model)

t = torch.Tensor(20,10)
model:forward(t)
print(model.output)

But using the available dropout parameter don't:

require 'rnn'

model = nn.Sequential()
model:add(nn.GRU(10, 5, 20, 0.25))
model:add(nn.GRU(5, 1, 20))
model:add(nn.Sigmoid())
model = nn.Sequencer(model)

t = torch.Tensor(20,10)
model:forward(t)
print(model.output)

The error itself...
In 1 module of nn.Sequential:
In 1 module of nn.Sequential:
In 2 module of nn.ConcatTable:
In 1 module of nn.Sequential:
In 1 module of nn.ParallelTable:
In 3 module of nn.Sequential:
bad argument #2 to '?' (out of bounds at /tmp/luarocks_torch-scm-1-9229/torch7/lib/TH/generic/THStorage.c:202)
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions