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
acef5270
Commit
acef5270
authored
Mar 24, 2021
by
Philipp Arras
Browse files
More tests
parent
f4dc08ae
Pipeline
#96739
passed with stages
in 11 minutes and 34 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
test/test_operators/test_jacobian.py
View file @
acef5270
...
...
@@ -88,16 +88,22 @@ def testBinary(type1, type2, space, seed):
ift
.
extra
.
check_operator
(
model
,
pos
,
ntries
=
ntries
)
def
test
SpecialDistributionOps
(
space
,
seed
):
def
test
InverseGamma
(
space
,
seed
):
with
ift
.
random
.
Context
(
seed
):
pos
=
ift
.
from_random
(
space
,
'normal'
)
alpha
=
1.5
q
=
0.73
model
=
ift
.
InverseGammaOperator
(
space
,
alpha
,
q
)
ift
.
extra
.
check_operator
(
model
,
pos
,
ntries
=
20
)
model
=
ift
.
UniformOperator
(
space
,
alpha
,
q
)
ift
.
extra
.
check_operator
(
model
,
pos
,
ntries
=
20
)
model
=
ift
.
LaplaceOperator
(
space
,
alpha
,
q
)
@
pmp
(
"loc"
,
[
0
,
13.2
])
@
pmp
(
"scale"
,
[
1
,
551.09
])
@
pmp
(
"op"
,
[
ift
.
UniformOperator
,
ift
.
LaplaceOperator
])
def
testSpecialDistributionOps
(
space
,
seed
,
loc
,
scale
,
op
):
with
ift
.
random
.
Context
(
seed
):
pos
=
ift
.
from_random
(
space
,
'normal'
)
model
=
op
(
space
,
loc
,
scale
)
ift
.
extra
.
check_operator
(
model
,
pos
,
ntries
=
20
)
...
...
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