Examples¶
All examples on GitHub —
examples/(clone, run, modify)
Runnable example scripts and notebooks live in the examples/ directory of
the repository. The notebooks under docs/notebooks/ are cell-by-cell
tutorials and the easiest entry point; they are grouped by topic below. Scripts
for workflows that don't fit a notebook (e.g. multi-process multi-GPU FWI) are
linked at the bottom of this page.
Notebooks¶
New here? Start with Hello · SWEEP
The smallest end-to-end SWEEP story in one notebook: parameters → model →
Acoustic() + PropTorch() → one shot gather → one .backward() for a
vp gradient → 5-line Adam loop. No external data.
Open notebook
-
FWI
Acoustic, variable-density and elastic Marmousi, multiscale and frequency-selection encoding, batched streamer windows, 3-D Overthrust.
-
NN · FWI
A neural network produces the velocity model; its weights are inverted through the propagator.
-
Wavefields
Elastic sources, DAS, topography, per-edge free surfaces, attenuation, poroelastic waves and solver settings.
-
Anisotropic
Pseudo-acoustic VTI, pure-qP Born and LSRTM, rotated staggered-grid TTI in 2-D and 3-D, and the displacement formulation.
-
SEM
The spectral-element solver: forward and backward, topography against finite differences, and Marmousi FWI.
-
Imaging
RTM, custom imaging conditions, the reflection-FWI gradient, and angle-domain gathers.
-
HPC
Memory strategies, boundary compression, multi-GPU data parallel, and domain decomposition.
-
Extending
Add a wave equation of your own and run it like a built-in.
-
Sensitivity & resolution
Radiation patterns and sensitivity kernels behind multiparameter trade-off, acoustic to poroelastic.
Scripts¶
For workflows that don't fit a single notebook — e.g. multi-process multi-GPU FWI — see:
-
Multi-GPU DDP (
fwi_marmousi_dist.py) — Torchtorchrundriver that scales one-shot-per-rank across multiple GPUs and syncs gradients withtorch.distributed. -
Model-parallel FWI (
dd_fwi_marmousi_2d.py,dd_fwi_marmousi_elastic_2d.py,dd_fwi_overthrust_update.py) — the other axis: one model split across GPUs instead of one shot per GPU. Acoustic and elastic 2-D on Marmousi, plus a 3-D Overthrust model update. The two Marmousi scripts take--check <tag>to compare against an earlier run in--outdir(e.g. the same problem undivided,--px 1); the Overthrust script has no comparison mode.
Browse examples/
on GitHub for the full collection of runnable scripts.








