File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
examples/01_brain_alignment Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -8,4 +8,6 @@ doc/auto_examples
88doc /gen_modules
99doc /generated
1010doc /modules /generated
11- .vscode
11+ .vscode
12+
13+ examples /** /* .pkl
Original file line number Diff line number Diff line change 77In this example, we align 2 low-resolution left hemispheres
88using 4 fMRI feature maps (z-score contrast maps).
99"""
10-
1110# sphinx_gallery_thumbnail_number = 6
11+ import pickle
12+
1213import gdist
1314import matplotlib as mpl
1415import matplotlib .gridspec as gridspec
@@ -299,6 +300,17 @@ def compute_geometry_from_mesh(mesh_path):
299300 verbose = True ,
300301)
301302
303+ # %%
304+ # Computed mappings can easily be saved on disk and loaded back:
305+
306+ # Save mappings
307+ with open ("./mapping.pkl" , "wb" ) as f :
308+ pickle .dump (mapping , f )
309+
310+ # Load mappings
311+ with open ("./mapping.pkl" , "rb" ) as f :
312+ mapping = pickle .load (f )
313+
302314# %%
303315# Here is the evolution of the FUGW loss during training,
304316# without the entropic term. Note how, in this case,
You can’t perform that action at this time.
0 commit comments