Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
a6d099d6
Commit
a6d099d6
authored
Feb 06, 2017
by
Jakob Knollmüller
Browse files
RelaxedNewton implemented, QuasiNewtonMinimizer has to be changed in _get_descent_direction
parent
86e1eda4
Pipeline
#9978
passed with stage
in 29 minutes and 53 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty/minimization/relaxed_newton.py
View file @
a6d099d6
# -*- coding: utf-8 -*-
from
.quasi_newton_minimizer
import
QuasiNewtonMinimizer
class
RelaxedNewton
(
QuasiNewtonMinimizer
):
def
_get_descend_direction
(
self
,
energy
):
descend_direction
=
energy
.
curvature
.
inverse_times
(
energy
.
gradient
)
norm
=
descend_direction
.
norm
()
if
norm
!=
1
:
return
descend_direction
/
-
norm
else
:
return
descend_direction
*
-
1
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