Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NIFTy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ift
NIFTy
Commits
0b086b5f
Commit
0b086b5f
authored
6 years ago
by
Torsten Ensslin
Browse files
Options
Downloads
Patches
Plain Diff
started with documentation of energy_operators
parent
88c03baa
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
nifty5/operators/energy_operators.py
+28
-0
28 additions, 0 deletions
nifty5/operators/energy_operators.py
with
28 additions
and
0 deletions
nifty5/operators/energy_operators.py
+
28
−
0
View file @
0b086b5f
...
...
@@ -27,10 +27,31 @@ from .simple_linear_operators import VdotOperator
class
EnergyOperator
(
Operator
):
"""
NIFTy class for Energy operators.
The NIFTy EnergyOperator class derives from the Operator class.
An EnergyOperators transforms a field into a scalar, the information energy
of the field. Typically, an EnergyOperators is an information Hamiltonian
( = negative log probability) or a Gibbs free energy ( = averaged
Hamiltonian), aka Kullbach-Leibler divergence.
An EnergyOperator can also provide its gradient as an EndomorphicOperator
that converts a field into a field, the gradient of the Hamiltonian at the
field location.
"""
# TE FIXME: find out and document how gradient and metric are invoked
_target
=
DomainTuple
.
scalar_domain
()
class
SquaredNormOperator
(
EnergyOperator
):
"""
NIFTy class for a squared norm energy.
The NIFTy SquaredNormOperator class derives from the EnergyOperator class.
A SquaredNormOperator represents a field energy E that is the L2 norm of a
field f: E = f^dagger f
"""
def
__init__
(
self
,
domain
):
self
.
_domain
=
domain
...
...
@@ -44,6 +65,13 @@ class SquaredNormOperator(EnergyOperator):
class
QuadraticFormOperator
(
EnergyOperator
):
"""
NIFTy class for quadratic field energies.
The NIFTy QuadraticFormOperator derives from the EnergyOperator class.
It represents a field energy E that is a quadratic form of a field f with
kernel op: E = f^dagger op f /2
"""
def
__init__
(
self
,
op
):
from
.endomorphic_operator
import
EndomorphicOperator
if
not
isinstance
(
op
,
EndomorphicOperator
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment