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
e67874df
Commit
e67874df
authored
Jun 30, 2021
by
Philipp Arras
Browse files
Add docstring
parent
3e05d6d0
Pipeline
#104718
canceled with stages
in 2 minutes and 50 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/operators/jax_operator.py
View file @
e67874df
...
...
@@ -77,6 +77,26 @@ class JaxOperator(Operator):
class
JaxLikelihoodEnergyOperator
(
LikelihoodEnergyOperator
):
"""Wrap a jax function as nifty likelihood energy operator.
Parameters
----------
domain : DomainTuple or MultiDomain
Domain of the operator.
func : callable
The jax function that is evaluated by the operator. It has to be
implemented in terms of `jax.numpy` calls. If `domain` is a
`DomainTuple`, `func` takes a `dict` as argument and like-wise for the
target. It needs to map to a scalar.
transformation : Operator, optional
Coordinate transformation to Euclidean space.
sampling_dtype : dtype, optional
The dtype that shall be used for drawing samples from the metric of the
likelihood.
"""
def
__init__
(
self
,
domain
,
func
,
transformation
=
None
,
sampling_dtype
=
None
):
from
..sugar
import
makeDomain
self
.
_domain
=
makeDomain
(
domain
)
...
...
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