Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/nn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Grewe <dominikg@google.com>2015-04-28 18:07:32 +0300
committerDominik Grewe <dominikg@google.com>2015-04-28 18:36:55 +0300
commitd0da63e83825d4631a7f299766a1fa968eb5ccd3 (patch)
treeedab79c4cf664ef0dac24fb851923059027e659e /DotProduct.lua
parent485dd619695c47e49ab56ff518edad52b74475fc (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.lua7
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