Skip to content

Commit 2724eac

Browse files
Merge pull request #364 from nhynes/recurrence-lstab
Actually support passing tables of LongStorage as output size
2 parents d047d97 + ad54bb5 commit 2724eac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Recurrence.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ end
3434
-- This zero Tensor is forwarded as output(t=0).
3535
function Recurrence:recursiveResizeZero(tensor, size, batchSize)
3636
local isTable = torch.type(size) == 'table'
37-
if isTable and torch.type(size[1]) == 'table' then
37+
if isTable and torch.type(size[1]) ~= 'number' then
3838
tensor = (torch.type(tensor) == 'table') and tensor or {}
3939
for k,v in ipairs(size) do
4040
tensor[k] = self:recursiveResizeZero(tensor[k], v, batchSize)

0 commit comments

Comments
 (0)