Commit 73c7b018 authored by Philipp Arras's avatar Philipp Arras
Browse files

Byebye gradient helper

parent fd90fdc1
......@@ -51,19 +51,14 @@ class GaussianEnergy(Energy):
return .5 * self.residual.vdot(self.residual).real
return .5 * self.residual.vdot(self._cov.inverse(self.residual)).real
def _gradient_helper(self):
return self._inp.gradient
def gradient(self):
if self._cov is None:
return self._gradient_helper.adjoint(self.residual)
return self._gradient_helper.adjoint(self._cov.inverse(self.residual))
return self._inp.gradient.adjoint(self.residual)
return self._inp.gradient.adjoint(self._cov.inverse(self.residual))
def curvature(self):
return SandwichOperator.make(self._gradient_helper)
return SandwichOperator.make(self._inp.gradient)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment