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:
authorSoumith Chintala <soumith@gmail.com>2017-06-10 20:16:43 +0300
committerGitHub <noreply@github.com>2017-06-10 20:16:43 +0300
commitd578b37dcb62f8df4bcc0a3e004b81eaefc6e21f (patch)
tree97b34f5b5fcfd412f2395346c2a0a97fa144c767
parenta3724e89d906e3ad2d8911fcb466f6147f4cab00 (diff)
parentadd34481005346d09f0d5dc84d3bc0c0353ceda8 (diff)
Merge pull request #1239 from nicholas-leonard/ConcatTable-resize
ConcatTable uses resize instead of resizeAs
-rw-r--r--ConcatTable.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/ConcatTable.lua b/ConcatTable.lua
index b1d904f..7427193 100644
--- a/ConcatTable.lua
+++ b/ConcatTable.lua
@@ -44,7 +44,7 @@ local function backward(self, method, input, gradOutput, scale)
retable(self.gradInput, currentGradInput,
function(t, k, v)
t[k] = t[k] or v:clone()
- t[k]:resizeAs(v)
+ t[k]:resize(v:size())
t[k]:copy(v)
end
)
@@ -65,7 +65,7 @@ local function backward(self, method, input, gradOutput, scale)
for i,module in ipairs(self.modules) do
local currentGradInput = self:rethrowErrors(module, i, method, input, gradOutput[i], scale)
if i == 1 then
- self.gradInput:resizeAs(currentGradInput):copy(currentGradInput)
+ self.gradInput:resize(currentGradInput:size()):copy(currentGradInput)
else
self.gradInput:add(currentGradInput)
end