Add default option for ClippedMSECriterion
This commit is contained in:
parent
1dc32aaa89
commit
cf638aea48
|
@ -2,8 +2,8 @@ local ClippedMSECriterion, parent = torch.class('w2nn.ClippedMSECriterion','nn.C
|
||||||
|
|
||||||
function ClippedMSECriterion:__init(min, max)
|
function ClippedMSECriterion:__init(min, max)
|
||||||
parent.__init(self)
|
parent.__init(self)
|
||||||
self.min = min
|
self.min = min or 0
|
||||||
self.max = max
|
self.max = max or 1
|
||||||
self.diff = torch.Tensor()
|
self.diff = torch.Tensor()
|
||||||
self.diff_pow2 = torch.Tensor()
|
self.diff_pow2 = torch.Tensor()
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue