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:
authorSergio Guadarrama <sguada@gmail.com>2015-11-17 19:51:28 +0300
committerSoumith Chintala <soumith@gmail.com>2015-11-26 11:23:27 +0300
commit41d2b1d1ee8aa12b5195fbd3bd165bc932e0764f (patch)
tree2caa19a94c5db62be2cabe0e46e786127d00f394 /MSECriterion.lua
parent15bd5d31b4dc2208d57d179ac09ab2901932873f (diff)
Add SizeAverage to criterions in the constructor
Diffstat (limited to 'MSECriterion.lua')
-rw-r--r--MSECriterion.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/MSECriterion.lua b/MSECriterion.lua
index 655c74f..0519494 100644
--- a/MSECriterion.lua
+++ b/MSECriterion.lua
@@ -1,8 +1,12 @@
local MSECriterion, parent = torch.class('nn.MSECriterion', 'nn.Criterion')
-function MSECriterion:__init()
+function MSECriterion:__init(sizeAverage)
parent.__init(self)
- self.sizeAverage = true
+ if sizeAverage ~= nil then
+ self.sizeAverage = sizeAverage
+ else
+ self.sizeAverage = true
+ end
end
function MSECriterion:updateOutput(input, target)