Add support for clearState() in w2nn.LeakyReLU
This commit is contained in:
parent
1900ac7500
commit
223dcead67
|
@ -17,7 +17,7 @@ function LeakyReLU:updateOutput(input)
|
||||||
|
|
||||||
return self.output
|
return self.output
|
||||||
end
|
end
|
||||||
|
|
||||||
function LeakyReLU:updateGradInput(input, gradOutput)
|
function LeakyReLU:updateGradInput(input, gradOutput)
|
||||||
self.gradInput:resizeAs(gradOutput)
|
self.gradInput:resizeAs(gradOutput)
|
||||||
-- filter positive
|
-- filter positive
|
||||||
|
@ -29,3 +29,8 @@ function LeakyReLU:updateGradInput(input, gradOutput)
|
||||||
|
|
||||||
return self.gradInput
|
return self.gradInput
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function LeakyReLU:clearState()
|
||||||
|
nn.utils.clear(self, 'negative')
|
||||||
|
return parent.clearState(self)
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in a new issue