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
10
Issues
10
List
Boards
Labels
Service Desk
Milestones
Merge Requests
9
Merge Requests
9
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
a8f5f76d
Commit
a8f5f76d
authored
Mar 07, 2018
by
Martin Reinecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nasty hack for MPI
parent
042528af
Pipeline
#25851
passed with stage
in 5 minutes and 33 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
test/test_minimization/test_minimizers.py
test/test_minimization/test_minimizers.py
+13
-9
No files found.
test/test_minimization/test_minimizers.py
View file @
a8f5f76d
...
...
@@ -28,17 +28,17 @@ IC = ift.GradientNormController(tol_abs_gradnorm=1e-5, iteration_limit=1000)
spaces
=
[
ift
.
RGSpace
([
1024
],
distances
=
0.123
),
ift
.
HPSpace
(
32
)]
minimizers
=
[
ift
.
VL_BFGS
(
IC
)
,
ift
.
NonlinearCG
(
IC
,
"Polak-Ribiere"
)
,
minimizers
=
[
'ift.VL_BFGS(IC)'
,
'ift.NonlinearCG(IC, "Polak-Ribiere")'
,
# ift.NonlinearCG(IC, "Hestenes-Stiefel"),
ift
.
NonlinearCG
(
IC
,
"Fletcher-Reeves"
)
,
ift
.
NonlinearCG
(
IC
,
"5.49"
)
,
ift
.
NewtonCG
(
IC
)
,
ift
.
L_BFGS_B
(
IC
)
]
'ift.NonlinearCG(IC, "Fletcher-Reeves")'
,
'ift.NonlinearCG(IC, "5.49")'
,
'ift.NewtonCG(IC)'
,
'ift.L_BFGS_B(IC)'
]
newton_minimizers
=
[
ift
.
RelaxedNewton
(
IC
)
]
quadratic_only_minimizers
=
[
ift
.
ConjugateGradient
(
IC
)
]
slow_minimizers
=
[
ift
.
SteepestDescent
(
IC
)
]
newton_minimizers
=
[
'ift.RelaxedNewton(IC)'
]
quadratic_only_minimizers
=
[
'ift.ConjugateGradient(IC)'
]
slow_minimizers
=
[
'ift.SteepestDescent(IC)'
]
class
Test_Minimizers
(
unittest
.
TestCase
):
...
...
@@ -54,6 +54,7 @@ class Test_Minimizers(unittest.TestCase):
required_result
=
ift
.
Field
.
ones
(
space
,
dtype
=
np
.
float64
)
try
:
minimizer
=
eval
(
minimizer
)
energy
=
ift
.
QuadraticEnergy
(
A
=
covariance
,
b
=
required_result
,
position
=
starting_point
)
...
...
@@ -118,6 +119,7 @@ class Test_Minimizers(unittest.TestCase):
inverter
=
t2
)
try
:
minimizer
=
eval
(
minimizer
)
energy
=
RBEnergy
(
position
=
starting_point
)
(
energy
,
convergence
)
=
minimizer
(
energy
)
...
...
@@ -155,6 +157,7 @@ class Test_Minimizers(unittest.TestCase):
ift
.
Field
(
self
.
position
.
domain
,
val
=
v
))
try
:
minimizer
=
eval
(
minimizer
)
energy
=
ExpEnergy
(
position
=
starting_point
)
(
energy
,
convergence
)
=
minimizer
(
energy
)
...
...
@@ -192,6 +195,7 @@ class Test_Minimizers(unittest.TestCase):
ift
.
Field
(
self
.
position
.
domain
,
val
=
v
))
try
:
minimizer
=
eval
(
minimizer
)
energy
=
CoshEnergy
(
position
=
starting_point
)
(
energy
,
convergence
)
=
minimizer
(
energy
)
...
...
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