Skip to content

Commit

Permalink
Merge pull request #44 from TomF98/main
Browse files Browse the repository at this point in the history
Add FNO, show loss again in trainer and fix some small bugs
  • Loading branch information
DKreuter authored Nov 22, 2024
2 parents ea75604 + a9d4f3a commit c41665d
Show file tree
Hide file tree
Showing 46 changed files with 7,380 additions and 1,501 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
python -m pip install --upgrade pip
pip install -U setuptools setuptools_scm wheel
python -m pip install flake8 pytest pytest-cov
python -m pip install -e .
python -m pip install -e .[all]
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
Expand Down
464 changes: 0 additions & 464 deletions examples/deeponet/.ipynb_checkpoints/oscillator-checkpoint.ipynb

This file was deleted.

4 changes: 1 addition & 3 deletions examples/deeponet/inverse_ode.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Inverse DeepONet\n",
"### Inverse DeepONet\n",
"In this notebook, we present the learning of the inverse operator, that maps solution data to some input data. \n",
"To keep things simple we again consider the ODE:\n",
"\\begin{align*}\n",
Expand All @@ -28,8 +28,6 @@
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"os.environ[\"CUDA_VISIBLE_DEVICES\"] = \"1\"\n",
"import torch\n",
"import numpy as np\n",
"import torchphysics as tp\n",
Expand Down
4 changes: 1 addition & 3 deletions examples/deeponet/ode.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Physics-informed DeepONet: Solving a ODE for different right hand sides\n",
"### Physics-informed DeepONet: Solving a ODE for different right hand sides\n",
"In this notebook, we present an introduction to the physics-informed DeepONet [(paper)](https://arxiv.org/abs/2103.10974) utilities of TorchPhysics. \n",
"As an example, we try to learn the integral operator of the ODE:\n",
"\\begin{align*}\n",
Expand All @@ -27,8 +27,6 @@
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"os.environ[\"CUDA_VISIBLE_DEVICES\"] = \"2\"\n",
"import torch\n",
"import torchphysics as tp\n",
"import pytorch_lightning as pl"
Expand Down
2 changes: 0 additions & 2 deletions examples/deeponet/oscillator.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"os.environ[\"CUDA_VISIBLE_DEVICES\"] = \"3\"\n",
"import torchphysics as tp\n",
"import torch\n",
"import pytorch_lightning as pl"
Expand Down
2 changes: 0 additions & 2 deletions examples/deepritz/corner_pde.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"os.environ[\"CUDA_VISIBLE_DEVICES\"] = \"1\"\n",
"import torchphysics as tp \n",
"import torch\n",
"X = tp.spaces.R1('x') \n",
Expand Down
2 changes: 0 additions & 2 deletions examples/deepritz/poisson-equation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"os.environ[\"CUDA_VISIBLE_DEVICES\"] = \"0\"\n",
"import torch\n",
"import torchphysics as tp\n",
"import pytorch_lightning as pl"
Expand Down
376 changes: 376 additions & 0 deletions examples/fno/diffusion_2D.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit c41665d

Please sign in to comment.