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 /DotProduct.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 'DotProduct.lua')
-rw-r--r-- | DotProduct.lua | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/DotProduct.lua b/DotProduct.lua index 7f7b524..bc8e854 100644 --- a/DotProduct.lua +++ b/DotProduct.lua @@ -27,10 +27,3 @@ function DotProduct:updateGradInput(input, gradOutput) return self.gradInput end - -function DotProduct:type(type) - for i, tensor in ipairs(self.gradInput) do - self.gradInput[i] = tensor:type(type) - end - return parent.type(self, type) -end |