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 'Module.lua')
-rw-r--r--Module.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/Module.lua b/Module.lua
index 084db14..7812ef6 100644
--- a/Module.lua
+++ b/Module.lua
@@ -25,9 +25,10 @@ function Module:forward(input)
return self:updateOutput(input)
end
-function Module:backward(input, gradOutput)
+function Module:backward(input, gradOutput, scale)
+ scale = scale or 1
self:updateGradInput(input, gradOutput)
- self:accGradParameters(input, gradOutput)
+ self:accGradParameters(input, gradOutput, scale)
return self.gradInput
end