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
On Thursday, 7th July from 1 to 3 pm there will be a maintenance with a short downtime of GitLab.
Open sidebar
ift
NIFTy
Commits
39a7321a
Commit
39a7321a
authored
Jun 14, 2018
by
Reimar H Leike
Browse files
changed number of samples and maxgradientnorm tolerance such that the pictures look nice again
parent
2add9edd
Pipeline
#30895
passed with stages
in 1 minute and 28 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
demos/paper_demos/cartesian_wiener_filter.py
View file @
39a7321a
...
...
@@ -74,9 +74,11 @@ if __name__ == "__main__":
# Wiener filter
j
=
R
.
adjoint_times
(
N
.
inverse_times
(
data
))
ctrl
=
ift
.
GradientNormController
(
name
=
"inverter"
,
tol_abs_gradnorm
=
0.1
)
sampling_ctrl
=
ift
.
GradientNormController
(
name
=
"sampling"
,
tol_abs_gradnorm
=
1e2
)
inverter
=
ift
.
ConjugateGradient
(
controller
=
ctrl
)
sampling_inverter
=
ift
.
ConjugateGradient
(
controller
=
sampling_ctrl
)
wiener_curvature
=
ift
.
library
.
WienerFilterCurvature
(
S
=
S
,
N
=
N
,
R
=
R
,
inverter
=
inverter
,
sampling_inverter
=
inverter
)
S
=
S
,
N
=
N
,
R
=
R
,
inverter
=
inverter
,
sampling_inverter
=
sampling_
inverter
)
m_k
=
wiener_curvature
.
inverse_times
(
j
)
m
=
ht
(
m_k
)
...
...
@@ -88,7 +90,7 @@ if __name__ == "__main__":
ift
.
plot
(
data
.
cast_domain
(
plot_space
),
name
=
'data.png'
,
**
plotdict
)
ift
.
plot
(
m
.
cast_domain
(
plot_space
),
name
=
'map.png'
,
**
plotdict
)
# sampling the uncertainty map
mean
,
variance
=
ift
.
probe_with_posterior_samples
(
wiener_curvature
,
ht
,
1
0
)
mean
,
variance
=
ift
.
probe_with_posterior_samples
(
wiener_curvature
,
ht
,
5
0
)
ift
.
plot
(
ift
.
sqrt
(
variance
).
cast_domain
(
plot_space
),
name
=
"uncertainty.png"
,
**
plotdict
)
ift
.
plot
((
mean
+
m
).
cast_domain
(
plot_space
),
...
...
demos/paper_demos/wiener_filter.py
View file @
39a7321a
...
...
@@ -48,9 +48,11 @@ if __name__ == "__main__":
# Wiener filter
j
=
R
.
adjoint_times
(
N
.
inverse_times
(
data
))
ctrl
=
ift
.
GradientNormController
(
name
=
"inverter"
,
tol_abs_gradnorm
=
1e-2
)
sampling_ctrl
=
ift
.
GradientNormController
(
name
=
"sampling"
,
tol_abs_gradnorm
=
2e1
)
inverter
=
ift
.
ConjugateGradient
(
controller
=
ctrl
)
sampling_inverter
=
ift
.
ConjugateGradient
(
controller
=
sampling_ctrl
)
wiener_curvature
=
ift
.
library
.
WienerFilterCurvature
(
S
=
S
,
N
=
N
,
R
=
R
,
inverter
=
inverter
,
sampling_inverter
=
inverter
)
S
=
S
,
N
=
N
,
R
=
R
,
inverter
=
inverter
,
sampling_inverter
=
sampling_
inverter
)
m_k
=
wiener_curvature
.
inverse_times
(
j
)
m
=
ht
(
m_k
)
...
...
@@ -60,6 +62,6 @@ if __name__ == "__main__":
ift
.
plot
(
m
,
name
=
"map.png"
,
**
plotdict
)
# sampling the uncertainty map
mean
,
variance
=
ift
.
probe_with_posterior_samples
(
wiener_curvature
,
ht
,
5
)
mean
,
variance
=
ift
.
probe_with_posterior_samples
(
wiener_curvature
,
ht
,
5
0
)
ift
.
plot
(
ift
.
sqrt
(
variance
),
name
=
"uncertainty.png"
,
**
plotdict
)
ift
.
plot
(
mean
+
m
,
name
=
"posterior_mean.png"
,
**
plotdict
)
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