We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d047d97 + ad54bb5 commit 2724eacCopy full SHA for 2724eac
Recurrence.lua
@@ -34,7 +34,7 @@ end
34
-- This zero Tensor is forwarded as output(t=0).
35
function Recurrence:recursiveResizeZero(tensor, size, batchSize)
36
local isTable = torch.type(size) == 'table'
37
- if isTable and torch.type(size[1]) == 'table' then
+ if isTable and torch.type(size[1]) ~= 'number' then
38
tensor = (torch.type(tensor) == 'table') and tensor or {}
39
for k,v in ipairs(size) do
40
tensor[k] = self:recursiveResizeZero(tensor[k], v, batchSize)
0 commit comments