Skip to content

Commit

Permalink
Updated tutorials for version 0.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
fpicetti committed Apr 22, 2022
1 parent 9ce5e33 commit 2e216aa
Show file tree
Hide file tree
Showing 17 changed files with 4,548 additions and 4,756 deletions.
541 changes: 270 additions & 271 deletions tutorials/1D Travel-time tomography using the Eikonal equation.ipynb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@
"metadata": {},
"source": [
"In principle, an `AutogradFunction` can be casted also for Dask-distributed operators.\n",
"However, distributing a shot to each workers (as done in the [previous tutorial](./2D%20LS-RTM%20with%20devito.ipynb)) will require the objective function to be computed on different workers, too.\n",
"However, distributing a shot to each workers (as done in the [previous tutorial](./2D%20LS-RTM%20with%20devito,%20dask,%20and%20regularizers.ipynb)) will require the objective function to be computed on different workers, too.\n",
" \n",
"Therefore, we need to merge the distribution paradigms of Dask and PyTorch. Any help will be appreciated!"
]
Expand All @@ -461,7 +461,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand Down
96 changes: 53 additions & 43 deletions tutorials/2D LS-RTM with devito, dask, and regularizers.ipynb

Large diffs are not rendered by default.

144 changes: 85 additions & 59 deletions tutorials/2D Travel-time tomography using the Eikonal equation.ipynb

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions tutorials/Automatic Differentiation for nonlinear operators.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tutorials/AxInfo - exploit physical vectors.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand Down
68 changes: 16 additions & 52 deletions tutorials/Cupy Example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,39 +39,6 @@
"scrolled": true
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/nas/home/fpicetti/miniconda3/envs/occd/lib/python3.10/site-packages/cupy/_environment.py:436: UserWarning: \n",
"--------------------------------------------------------------------------------\n",
"\n",
" CuPy may not function correctly because multiple CuPy packages are installed\n",
" in your environment:\n",
"\n",
" cupy, cupy-cuda111\n",
"\n",
" Follow these steps to resolve this issue:\n",
"\n",
" 1. For all packages listed above, run the following command to remove all\n",
" existing CuPy installations:\n",
"\n",
" $ pip uninstall <package_name>\n",
"\n",
" If you previously installed CuPy via conda, also run the following:\n",
"\n",
" $ conda uninstall cupy\n",
"\n",
" 2. Install the appropriate CuPy package.\n",
" Refer to the Installation Guide for detailed instructions.\n",
"\n",
" https://docs.cupy.dev/en/stable/install.html\n",
"\n",
"--------------------------------------------------------------------------------\n",
"\n",
" warnings.warn(f'''\n"
]
},
{
"name": "stdout",
"output_type": "stream",
Expand Down Expand Up @@ -136,7 +103,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"GPU 0 - TITAN V\n"
"GPU 0 - Tesla V100-PCIE-16GB\n"
]
}
],
Expand Down Expand Up @@ -169,7 +136,7 @@
}
],
"source": [
"G = o.cupy.GaussianFilter(x, (3, 3))\n",
"G = o.GaussianFilter(x, (3, 3))\n",
"d = G * x\n",
"\n",
"plt.figure(figsize=(11, 4))\n",
Expand Down Expand Up @@ -247,16 +214,13 @@
"output_type": "stream",
"text": [
"##########################################################################################\n",
"\t\t\tSPLIT-BREGMAN SOLVER\n",
"\n",
"\tRestart folder: /tmp/restart_2022-04-16T23-46-51.476642/\n",
"\tModeling Operator:\tGausFilt\n",
"\tInner iterations:\t3\n",
"\tSolver iterations:\t10\n",
"\tL1 Regularizer op:\tGradient\n",
"\tL1 Regularizer weight:\t1.00e-03\n",
"\tBregman update weight:\t1.00e+00\n",
"\tUsing warm start option for inner problem\n",
" SPLIT-BREGMAN Solver\n",
" Restart folder: /tmp/restart_2022-04-22T01-47-39.563843/\n",
" Inner iterations: 3\n",
" Solver iterations: 10\n",
" L1 Regularizer weight: 1.00e-03\n",
" Bregman update weight: 1.00e+00\n",
" Using warm start option for inner problem\n",
"##########################################################################################\n",
"\n",
"iter = 000, obj = 6.57986e+02, df_obj = 6.58e+02, reg_obj = 0.00e+00, rnorm = 3.63e+01\n",
Expand Down Expand Up @@ -347,14 +311,14 @@
"iter = 085, obj = 1.40036e+00, df_obj = 8.24e-05, reg_obj = 1.40e+00, rnorm = 1.59e+01\n",
"iter = 086, obj = 1.39887e+00, df_obj = 8.17e-05, reg_obj = 1.40e+00, rnorm = 1.60e+01\n",
"iter = 087, obj = 1.39737e+00, df_obj = 8.10e-05, reg_obj = 1.40e+00, rnorm = 1.60e+01\n",
"iter = 088, obj = 1.39591e+00, df_obj = 8.02e-05, reg_obj = 1.40e+00, rnorm = 1.60e+01\n"
"iter = 088, obj = 1.39591e+00, df_obj = 8.02e-05, reg_obj = 1.40e+00, rnorm = 1.60e+01\n",
"iter = 089, obj = 1.39444e+00, df_obj = 7.96e-05, reg_obj = 1.39e+00, rnorm = 1.60e+01\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"iter = 089, obj = 1.39444e+00, df_obj = 7.96e-05, reg_obj = 1.39e+00, rnorm = 1.60e+01\n",
"iter = 090, obj = 1.39301e+00, df_obj = 7.89e-05, reg_obj = 1.39e+00, rnorm = 1.60e+01\n",
"iter = 091, obj = 1.39157e+00, df_obj = 7.82e-05, reg_obj = 1.39e+00, rnorm = 1.60e+01\n",
"iter = 092, obj = 1.39018e+00, df_obj = 7.75e-05, reg_obj = 1.39e+00, rnorm = 1.60e+01\n",
Expand Down Expand Up @@ -448,15 +412,15 @@
"iter = 180, obj = 1.31373e+00, df_obj = 4.81e-05, reg_obj = 1.31e+00, rnorm = 1.67e+01\n",
"iter = 181, obj = 1.31318e+00, df_obj = 4.80e-05, reg_obj = 1.31e+00, rnorm = 1.67e+01\n",
"iter = 182, obj = 1.31271e+00, df_obj = 4.78e-05, reg_obj = 1.31e+00, rnorm = 1.67e+01\n",
"iter = 183, obj = 1.31216e+00, df_obj = 4.77e-05, reg_obj = 1.31e+00, rnorm = 1.67e+01\n"
"iter = 183, obj = 1.31216e+00, df_obj = 4.77e-05, reg_obj = 1.31e+00, rnorm = 1.67e+01\n",
"iter = 184, obj = 1.31169e+00, df_obj = 4.75e-05, reg_obj = 1.31e+00, rnorm = 1.67e+01\n",
"iter = 185, obj = 1.31114e+00, df_obj = 4.73e-05, reg_obj = 1.31e+00, rnorm = 1.68e+01\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"iter = 184, obj = 1.31169e+00, df_obj = 4.75e-05, reg_obj = 1.31e+00, rnorm = 1.67e+01\n",
"iter = 185, obj = 1.31114e+00, df_obj = 4.73e-05, reg_obj = 1.31e+00, rnorm = 1.68e+01\n",
"iter = 186, obj = 1.31068e+00, df_obj = 4.71e-05, reg_obj = 1.31e+00, rnorm = 1.68e+01\n",
"iter = 187, obj = 1.31014e+00, df_obj = 4.70e-05, reg_obj = 1.31e+00, rnorm = 1.68e+01\n",
"iter = 188, obj = 1.30968e+00, df_obj = 4.68e-05, reg_obj = 1.31e+00, rnorm = 1.68e+01\n",
Expand All @@ -475,7 +439,7 @@
"Terminate: maximum number of iterations reached\n",
"\n",
"##########################################################################################\n",
"\t\t\tSPLIT-BREGMAN SOLVER end\n",
" SPLIT-BREGMAN Solver end\n",
"##########################################################################################\n"
]
}
Expand Down Expand Up @@ -568,7 +532,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand Down
Loading

0 comments on commit 2e216aa

Please sign in to comment.