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
fe49d4aa
Commit
fe49d4aa
authored
Jun 28, 2018
by
Julian Ruestig
📡
Browse files
Documentation to LinearModel
parent
e0a6b7dc
Changes
3
Hide whitespace changes
Inline
Side-by-side
nifty5/models/constant.py
View file @
fe49d4aa
...
...
@@ -15,7 +15,6 @@
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from
.model
import
Model
...
...
nifty5/models/linear_model.py
View file @
fe49d4aa
...
...
@@ -21,8 +21,22 @@ from .model import Model
class
LinearModel
(
Model
):
def
__init__
(
self
,
inp
,
lin_op
):
"""
Computes lin_op(inp) where lin_op is a Linear Operator
"""Computes lin_op(inp) where lin_op is a Linear Operator
Parameters
----------
inp : Model
lin_op : LinearOperator
linear function to be applied to model
Returns
-------
Model
Model with linear Operator applied:
- Model.value = LinOp (inp.value) [key-wise]
- Gradient = LinOp * inp.gradient
"""
from
..operators.linear_operator
import
LinearOperator
super
(
LinearModel
,
self
).
__init__
(
inp
.
position
)
...
...
nifty5/models/model.py
View file @
fe49d4aa
...
...
@@ -52,7 +52,6 @@ class Model(NiftyMetaBase()):
The location in parameter space where value and gradient are
evaluated.
"""
return
self
.
_position
@
property
...
...
@@ -62,7 +61,6 @@ class Model(NiftyMetaBase()):
The value of the model at given `position`.
"""
return
self
.
_value
@
property
...
...
Write
Preview
Supports
Markdown
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