diff options
author | Soumith Chintala <soumith@gmail.com> | 2015-01-31 19:38:14 +0300 |
---|---|---|
committer | Soumith Chintala <soumith@gmail.com> | 2015-01-31 19:38:14 +0300 |
commit | b74da0080e3f6af53836e36478d6df58c572d351 (patch) | |
tree | e55e7a4289fca16bd5395204f78765cad4b87f8a /L1Penalty.lua | |
parent | b61e8304414b2295a229c6c3a25bee0fe505a0db (diff) |
fixed L1Penalty constructor arguments
Diffstat (limited to 'L1Penalty.lua')
-rw-r--r-- | L1Penalty.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/L1Penalty.lua b/L1Penalty.lua index 661cbf2..457a343 100644 --- a/L1Penalty.lua +++ b/L1Penalty.lua @@ -8,9 +8,13 @@ function L1Penalty:__init(l1weight, sizeAverage, provideOutput) parent.__init(self) self.l1weight = l1weight self.sizeAverage = sizeAverage or false - self.provideOutput = provideOutput or true + if provideOutput == nil then + self.provideOutput = true + else + self.provideOutput = provideOutput + end end - + function L1Penalty:updateOutput(input) local m = self.l1weight if self.sizeAverage == true then |