diff options
author | Clement Farabet <clement.farabet@gmail.com> | 2012-07-07 02:36:28 +0400 |
---|---|---|
committer | Clement Farabet <clement.farabet@gmail.com> | 2012-07-07 02:36:28 +0400 |
commit | addee6661f02adb2a62b6c6b8d30479beff0fa12 (patch) | |
tree | aa76421ea4afd034c6b51f68bf7712d2bd56e9b1 | |
parent | 4081495b78ceb1b102e82cb642e31bc9f04182be (diff) |
Got rid of some hessian code that didn't belong here.
-rw-r--r-- | hessian.lua | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/hessian.lua b/hessian.lua index 493f7d9..b3f2333 100644 --- a/hessian.lua +++ b/hessian.lua @@ -196,6 +196,7 @@ function nn.hessian.activate() function nn.SpatialConvolution.accDiagHessianParameters(self, input, diagHessianOutput) accDiagHessianParameters(self,input, diagHessianOutput, {'gradWeight'}, {'diagHessianWeight'}) end + function nn.SpatialConvolution.initDiagHessianParameters(self) initDiagHessianParameters(self,{'gradWeight'},{'diagHessianWeight'}) end @@ -211,6 +212,7 @@ function nn.hessian.activate() function nn.SpatialConvolutionMap.accDiagHessianParameters(self, input, diagHessianOutput) accDiagHessianParameters(self,input, diagHessianOutput, {'gradWeight','gradBias'}, {'diagHessianWeight','diagHessianBias'}) end + function nn.SpatialConvolutionMap.initDiagHessianParameters(self) initDiagHessianParameters(self,{'gradWeight','gradBias'},{'diagHessianWeight','diagHessianBias'}) end @@ -223,26 +225,6 @@ function nn.hessian.activate() return self.diagHessianInput end - function nn.TanhShrink.updateDiagHessianInput(self, input, diagHessianOutput) - updateDiagHessianInputPointWise(self.tanh,input, diagHessianOutput) - self.diagHessianInput = self.diagHessianInput or input.new():resizeAs(input) - torch.add(self.diagHessianInput, self.tanh.diagHessianInput, diagHessianOutput) - return self.diagHessianInput - end - - function nn.Diag.updateDiagHessianInput(self, input, diagHessianOutput) - updateDiagHessianInput(self, input, diagHessianOutput, {'weight'}, {'weightSq'}) - return self.diagHessianInput - end - - function nn.Diag.accDiagHessianParameters(self, input, diagHessianOutput) - accDiagHessianParameters(self,input, diagHessianOutput, {'gradWeight'}, {'diagHessianWeight'}) - end - - function nn.Diag.initDiagHessianParameters(self) - initDiagHessianParameters(self,{'gradWeight'},{'diagHessianWeight'}) - end - ---------------------------------------------------------------------- -- Parameters manipulation: -- we modify these functions such that they return hessian coefficients |