diff options
author | Dominik Grewe <dominikg@google.com> | 2015-04-28 18:07:32 +0300 |
---|---|---|
committer | Dominik Grewe <dominikg@google.com> | 2015-04-28 18:36:55 +0300 |
commit | d0da63e83825d4631a7f299766a1fa968eb5ccd3 (patch) | |
tree | edab79c4cf664ef0dac24fb851923059027e659e /ConcatTable.lua | |
parent | 485dd619695c47e49ab56ff518edad52b74475fc (diff) |
Make type() truly recursive.
Recursively iterate over the whole table, converting each tensor to the
given type. Removes need for many specialized type() functions.
Diffstat (limited to 'ConcatTable.lua')
-rw-r--r-- | ConcatTable.lua | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/ConcatTable.lua b/ConcatTable.lua index 706ee6a..93d9ad5 100644 --- a/ConcatTable.lua +++ b/ConcatTable.lua @@ -86,15 +86,6 @@ function ConcatTable:zeroGradParameters() end end -function ConcatTable:type(type) - parent.type(self, type) - if torch.type(self.gradInput) == 'table' then - for i, gradInput in ipairs(self.gradInput) do - self.gradInput[i] = gradInput:type(type) - end - end -end - function ConcatTable:__tostring__() local tab = ' ' local line = '\n' |