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:
Diffstat (limited to 'test/test.lua')
-rw-r--r--test/test.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test.lua b/test/test.lua
index 8de35a2..29f76da 100644
--- a/test/test.lua
+++ b/test/test.lua
@@ -1352,9 +1352,9 @@ function nntest.TemporalConvolution()
mytester:asserteq(0, berr, torch.typename(module) .. ' - i/o backward err ')
-- 2D matches 1D
- local output = module:forward(input)
+ local output = module:forward(input):clone()
local outputGrad = torch.randn(output:size())
- local inputGrad = module:backward(input, outputGrad)
+ local inputGrad = module:backward(input, outputGrad):clone()
local input1D = input:select(1, 1)
local output1D = module:forward(input1D)