Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NIFTy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
13
Issues
13
List
Boards
Labels
Service Desk
Milestones
Merge Requests
10
Merge Requests
10
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ift
NIFTy
Commits
c3627c40
Commit
c3627c40
authored
Feb 19, 2018
by
Martin Reinecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more docs
parent
cc7f44e4
Pipeline
#25134
passed with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
4 deletions
+21
-4
docs/source/code.rst
docs/source/code.rst
+6
-1
nifty4/minimization/__init__.py
nifty4/minimization/__init__.py
+3
-3
nifty4/minimization/scipy_minimizer.py
nifty4/minimization/scipy_minimizer.py
+12
-0
No files found.
docs/source/code.rst
View file @
c3627c40
...
...
@@ -288,6 +288,11 @@ Of these algorithms, only :class:`RelaxedNewton` requires the energy object to
provide a :attr:`~Energy.curvature` property, the others only need energy
values and gradients.
The flexibility of NIFTy's design allows using externally provided
minimizers. With only small effort, adapters for two SciPy minimizers were
written; they are available under the names :class:`NewtonCG` and
:class:`L_BFGS_B`.
Application to operator inversion
---------------------------------
...
...
@@ -302,5 +307,5 @@ A classical example is the information propagator
which must be applied when calculating a Wiener filter. Only its inverse
application is straightforward; to use it in forward direction, we make use
of NIFTy's :class:`InversionEnabler` class, which internally performs a
minimization of a :class:`QuadraticEnergy` by means of
a
minimization of a :class:`QuadraticEnergy` by means of
the
:class:`ConjugateGradient` algorithm.
nifty4/minimization/__init__.py
View file @
c3627c40
...
...
@@ -9,7 +9,7 @@ from .descent_minimizer import DescentMinimizer
from
.steepest_descent
import
SteepestDescent
from
.vl_bfgs
import
VL_BFGS
from
.relaxed_newton
import
RelaxedNewton
from
.scipy_minimizer
import
NewtonCG
,
L_BFGS_B
from
.scipy_minimizer
import
ScipyMinimizer
,
NewtonCG
,
L_BFGS_B
from
.energy
import
Energy
from
.quadratic_energy
import
QuadraticEnergy
from
.line_energy
import
LineEnergy
...
...
@@ -17,5 +17,5 @@ from .line_energy import LineEnergy
__all__
=
[
"LineSearch"
,
"LineSearchStrongWolfe"
,
"IterationController"
,
"GradientNormController"
,
"Minimizer"
,
"ConjugateGradient"
,
"NonlinearCG"
,
"DescentMinimizer"
,
"SteepestDescent"
,
"VL_BFGS"
,
"RelaxedNewton"
,
"
NewtonCG
"
,
"L_BFGS_B"
,
"Energy"
,
"QuadraticEnergy"
,
"LineEnergy"
]
"SteepestDescent"
,
"VL_BFGS"
,
"RelaxedNewton"
,
"
ScipyMinimizer
"
,
"
NewtonCG"
,
"
L_BFGS_B"
,
"Energy"
,
"QuadraticEnergy"
,
"LineEnergy"
]
nifty4/minimization/scipy_minimizer.py
View file @
c3627c40
...
...
@@ -104,11 +104,23 @@ class ScipyMinimizer(Minimizer):
def
NewtonCG
(
controller
):
"""Returns a ScipyMinimizer object carrying out the Newton-CG algorithm.
See Also
--------
ScipyMinimizer
"""
return
ScipyMinimizer
(
controller
,
"Newton-CG"
,
{
"xtol"
:
1e-20
,
"maxiter"
:
None
},
True
)
def
L_BFGS_B
(
controller
,
maxcor
=
10
):
"""Returns a ScipyMinimizer object carrying out the L-BFGS-B algorithm.
See Also
--------
ScipyMinimizer
"""
return
ScipyMinimizer
(
controller
,
"L-BFGS-B"
,
{
"ftol"
:
1e-20
,
"gtol"
:
1e-20
,
"maxcor"
:
maxcor
},
False
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment