Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NIFTy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ift
NIFTy
Commits
b84dfad9
Commit
b84dfad9
authored
Jan 7, 2019
by
Philipp Arras
Browse files
Options
Downloads
Patches
Plain Diff
Cosmetics
parent
e0f0f20a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
demos/getting_started_1.py
+2
-1
2 additions, 1 deletion
demos/getting_started_1.py
demos/getting_started_2.py
+2
-1
2 additions, 1 deletion
demos/getting_started_2.py
demos/getting_started_3.py
+1
-2
1 addition, 2 deletions
demos/getting_started_3.py
with
5 additions
and
4 deletions
demos/getting_started_1.py
+
2
−
1
View file @
b84dfad9
...
@@ -21,9 +21,10 @@
...
@@ -21,9 +21,10 @@
# 1D (set mode=0), 2D (mode=1), or on the sphere (mode=2)
# 1D (set mode=0), 2D (mode=1), or on the sphere (mode=2)
###############################################################################
###############################################################################
import
nifty5
as
ift
import
numpy
as
np
import
numpy
as
np
import
nifty5
as
ift
def
make_checkerboard_mask
(
position_space
):
def
make_checkerboard_mask
(
position_space
):
# Checkerboard mask for 2D mode
# Checkerboard mask for 2D mode
...
...
...
...
This diff is collapsed.
Click to expand it.
demos/getting_started_2.py
+
2
−
1
View file @
b84dfad9
...
@@ -21,9 +21,10 @@
...
@@ -21,9 +21,10 @@
# 1D (set mode=0), 2D (mode=1), or on the sphere (mode=2)
# 1D (set mode=0), 2D (mode=1), or on the sphere (mode=2)
###############################################################################
###############################################################################
import
nifty5
as
ift
import
numpy
as
np
import
numpy
as
np
import
nifty5
as
ift
def
exposure_2d
():
def
exposure_2d
():
# Structured exposure for 2D mode
# Structured exposure for 2D mode
...
...
...
...
This diff is collapsed.
Click to expand it.
demos/getting_started_3.py
+
1
−
2
View file @
b84dfad9
...
@@ -116,10 +116,9 @@ if __name__ == '__main__':
...
@@ -116,10 +116,9 @@ if __name__ == '__main__':
# Draw new samples to approximate the KL five times
# Draw new samples to approximate the KL five times
for
i
in
range
(
5
):
for
i
in
range
(
5
):
# Draw new samples and minimize KL
KL
=
ift
.
KL_Energy
(
position
,
H
,
N_samples
)
KL
=
ift
.
KL_Energy
(
position
,
H
,
N_samples
)
# Minimize KL
KL
,
convergence
=
minimizer
(
KL
)
KL
,
convergence
=
minimizer
(
KL
)
# Update position
position
=
KL
.
position
position
=
KL
.
position
# Plot current reconstruction
# Plot current reconstruction
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment