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
24e6641d
Commit
24e6641d
authored
Dec 15, 2018
by
Jakob Knollmueller
Browse files
renaming stuff is hard
parent
ec3ca702
Changes
4
Hide whitespace changes
Inline
Side-by-side
demos/bernoulli_demo.py
View file @
24e6641d
...
...
@@ -50,7 +50,7 @@ if __name__ == '__main__':
A
=
ift
.
create_power_operator
(
harmonic_space
,
sqrtpspec
)
# Set up a sky model
sky
=
ift
.
positive_tanh
(
HT
(
A
))
sky
=
ift
.
sigmoid
(
HT
(
A
))
GR
=
ift
.
GeometryRemover
(
position_space
)
# Set up instrumental response
...
...
nifty5/sugar.py
View file @
24e6641d
...
...
@@ -37,7 +37,9 @@ from .operators.distributors import PowerDistributor
__all__
=
[
'PS_field'
,
'power_analyze'
,
'create_power_operator'
,
'create_harmonic_smoothing_operator'
,
'from_random'
,
'full'
,
'from_global_data'
,
'from_local_data'
,
'makeDomain'
,
'sqrt'
,
'exp'
,
'log'
,
'tanh'
,
'positive_tanh'
,
'makeDomain'
,
'sqrt'
,
'exp'
,
'log'
,
'tanh'
,
'sigmoid'
,
'sin'
,
'cos'
,
'tan'
,
'sinh'
,
'cosh'
,
'absolute'
,
'one_over'
,
'hardplus'
,
'sinc'
,
'conjugate'
,
'get_signal_variance'
,
'makeOp'
,
'domain_union'
,
'get_default_codomain'
]
...
...
test/test_energies/test_consistency.py
View file @
24e6641d
...
...
@@ -112,7 +112,7 @@ class Energy_Tests(unittest.TestCase):
def
testBernoulli
(
self
,
space
,
seed
):
model
=
self
.
make_model
(
space_key
=
's1'
,
space
=
space
,
seed
=
seed
)[
's1'
]
model
=
model
.
positive_tanh
()
model
=
model
.
sigmoid
()
d
=
np
.
random
.
binomial
(
1
,
0.1
,
size
=
space
.
shape
)
d
=
ift
.
Field
.
from_global_data
(
space
,
d
)
energy
=
ift
.
BernoulliEnergy
(
d
)
...
...
test/test_models/test_model_gradients.py
View file @
24e6641d
...
...
@@ -76,7 +76,7 @@ class Model_Tests(unittest.TestCase):
model
=
ift
.
ScalingOperator
(
2.456
,
space
)(
select_s1
*
select_s2
)
pos
=
ift
.
from_random
(
"normal"
,
dom
)
ift
.
extra
.
check_value_gradient_consistency
(
model
,
pos
,
ntries
=
20
)
model
=
ift
.
positive_tanh
(
ift
.
ScalingOperator
(
2.456
,
space
)(
model
=
ift
.
sigmoid
(
ift
.
ScalingOperator
(
2.456
,
space
)(
select_s1
*
select_s2
))
pos
=
ift
.
from_random
(
"normal"
,
dom
)
ift
.
extra
.
check_value_gradient_consistency
(
model
,
pos
,
ntries
=
20
)
...
...
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