From 6916d8f6b368594117f83afca35a497930fbedf1 Mon Sep 17 00:00:00 2001 From: FilippoOlivo Date: Mon, 25 Nov 2024 17:49:56 +0100 Subject: [PATCH] Remove tutorial5.ipynb and test_dataset.py --- tests/test_dataset.py | 227 --------------- tutorials/tutorial5/tutorial.ipynb | 445 ----------------------------- 2 files changed, 672 deletions(-) delete mode 100644 tests/test_dataset.py delete mode 100644 tutorials/tutorial5/tutorial.ipynb diff --git a/tests/test_dataset.py b/tests/test_dataset.py deleted file mode 100644 index c8e29cec..00000000 --- a/tests/test_dataset.py +++ /dev/null @@ -1,227 +0,0 @@ -import math -import torch -from pina.data import SamplePointDataset, SupervisedDataset, PinaDataModule, \ - UnsupervisedDataset -from pina.data import PinaDataLoader -from pina import LabelTensor, Condition -from pina.equation import Equation -from pina.domain import CartesianDomain -from pina.problem import SpatialProblem, AbstractProblem -from pina.operators import laplacian -from pina.equation.equation_factory import FixedValue -from pina.graph import Graph - - -def laplace_equation(input_, output_): - force_term = (torch.sin(input_.extract(['x']) * torch.pi) * - torch.sin(input_.extract(['y']) * torch.pi)) - delta_u = laplacian(output_.extract(['u']), input_) - return delta_u - force_term - - -my_laplace = Equation(laplace_equation) -in_ = LabelTensor(torch.tensor([[0., 1.]]), ['x', 'y']) -out_ = LabelTensor(torch.tensor([[0.]]), ['u']) -in2_ = LabelTensor(torch.rand(60, 2), ['x', 'y']) -out2_ = LabelTensor(torch.rand(60, 1), ['u']) - - -class Poisson(SpatialProblem): - output_variables = ['u'] - spatial_domain = CartesianDomain({'x': [0, 1], 'y': [0, 1]}) - - conditions = { - 'gamma1': - Condition(domain=CartesianDomain({ - 'x': [0, 1], - 'y': 1 - }), - equation=FixedValue(0.0)), - 'gamma2': - Condition(domain=CartesianDomain({ - 'x': [0, 1], - 'y': 0 - }), - equation=FixedValue(0.0)), - 'gamma3': - Condition(domain=CartesianDomain({ - 'x': 1, - 'y': [0, 1] - }), - equation=FixedValue(0.0)), - 'gamma4': - Condition(domain=CartesianDomain({ - 'x': 0, - 'y': [0, 1] - }), - equation=FixedValue(0.0)), - 'D': - Condition(input_points=LabelTensor(torch.rand(size=(100, 2)), - ['x', 'y']), - equation=my_laplace), - 'data': - Condition(input_points=in_, output_points=out_), - 'data2': - Condition(input_points=in2_, output_points=out2_), - 'unsupervised': - Condition( - input_points=LabelTensor(torch.rand(size=(45, 2)), ['x', 'y']), - conditional_variables=LabelTensor(torch.ones(size=(45, 1)), - ['alpha']), - ), - 'unsupervised2': - Condition( - input_points=LabelTensor(torch.rand(size=(90, 2)), ['x', 'y']), - conditional_variables=LabelTensor(torch.ones(size=(90, 1)), - ['alpha']), - ) - } - - -boundaries = ['gamma1', 'gamma2', 'gamma3', 'gamma4'] -poisson = Poisson() -poisson.discretise_domain(10, 'grid', locations=boundaries) - - -def test_sample(): - sample_dataset = SamplePointDataset(poisson, device='cpu') - assert len(sample_dataset) == 140 - assert sample_dataset.input_points.shape == (140, 2) - assert sample_dataset.input_points.labels == ['x', 'y'] - assert sample_dataset.condition_indices.dtype == torch.uint8 - assert sample_dataset.condition_indices.max() == torch.tensor(4) - assert sample_dataset.condition_indices.min() == torch.tensor(0) - - -def test_data(): - dataset = SupervisedDataset(poisson, device='cpu') - assert len(dataset) == 61 - assert dataset['input_points'].shape == (61, 2) - assert dataset.input_points.shape == (61, 2) - assert dataset['input_points'].labels == ['x', 'y'] - assert dataset.input_points.labels == ['x', 'y'] - assert dataset.input_points[3:].shape == (58, 2) - assert dataset.output_points[:3].labels == ['u'] - assert dataset.output_points.shape == (61, 1) - assert dataset.output_points.labels == ['u'] - assert dataset.condition_indices.dtype == torch.uint8 - assert dataset.condition_indices.max() == torch.tensor(1) - assert dataset.condition_indices.min() == torch.tensor(0) - - -def test_unsupervised(): - dataset = UnsupervisedDataset(poisson, device='cpu') - assert len(dataset) == 135 - assert dataset.input_points.shape == (135, 2) - assert dataset.input_points.labels == ['x', 'y'] - assert dataset.input_points[3:].shape == (132, 2) - - assert dataset.conditional_variables.shape == (135, 1) - assert dataset.conditional_variables.labels == ['alpha'] - assert dataset.condition_indices.dtype == torch.uint8 - assert dataset.condition_indices.max() == torch.tensor(1) - assert dataset.condition_indices.min() == torch.tensor(0) - - -def test_data_module(): - data_module = PinaDataModule(poisson, device='cpu') - data_module.setup() - loader = data_module.train_dataloader() - assert isinstance(loader, PinaDataLoader) - assert isinstance(loader, PinaDataLoader) - - data_module = PinaDataModule(poisson, - device='cpu', - batch_size=10, - shuffle=False) - data_module.setup() - loader = data_module.train_dataloader() - assert len(loader) == 24 - for i in loader: - assert len(i) <= 10 - len_ref = sum( - [math.ceil(len(dataset) * 0.7) for dataset in data_module.datasets]) - len_real = sum( - [len(dataset) for dataset in data_module.splits['train'].values()]) - assert len_ref == len_real - - supervised_dataset = SupervisedDataset(poisson, device='cpu') - data_module = PinaDataModule(poisson, - device='cpu', - batch_size=10, - shuffle=False, - datasets=[supervised_dataset]) - data_module.setup() - loader = data_module.train_dataloader() - for batch in loader: - assert len(batch) <= 10 - - physics_dataset = SamplePointDataset(poisson, device='cpu') - data_module = PinaDataModule(poisson, - device='cpu', - batch_size=10, - shuffle=False, - datasets=[physics_dataset]) - data_module.setup() - loader = data_module.train_dataloader() - for batch in loader: - assert len(batch) <= 10 - - unsupervised_dataset = UnsupervisedDataset(poisson, device='cpu') - data_module = PinaDataModule(poisson, - device='cpu', - batch_size=10, - shuffle=False, - datasets=[unsupervised_dataset]) - data_module.setup() - loader = data_module.train_dataloader() - for batch in loader: - assert len(batch) <= 10 - - -def test_loader(): - data_module = PinaDataModule(poisson, device='cpu', batch_size=10) - data_module.setup() - loader = data_module.train_dataloader() - assert isinstance(loader, PinaDataLoader) - assert len(loader) == 24 - for i in loader: - assert len(i) <= 10 - assert i.supervised.input_points.labels == ['x', 'y'] - assert i.physics.input_points.labels == ['x', 'y'] - assert i.unsupervised.input_points.labels == ['x', 'y'] - assert i.supervised.input_points.requires_grad == True - assert i.physics.input_points.requires_grad == True - assert i.unsupervised.input_points.requires_grad == True - - -coordinates = LabelTensor(torch.rand((100, 100, 2)), labels=['x', 'y']) -data = LabelTensor(torch.rand((100, 100, 3)), labels=['ux', 'uy', 'p']) - - -class GraphProblem(AbstractProblem): - output = LabelTensor(torch.rand((100, 3)), labels=['ux', 'uy', 'p']) - input = [ - Graph.build('radius', - nodes_coordinates=coordinates[i, :, :], - nodes_data=data[i, :, :], - radius=0.2) for i in range(100) - ] - output_variables = ['u'] - - conditions = { - 'graph_data': Condition(input_points=input, output_points=output) - } - - -graph_problem = GraphProblem() - - -def test_loader_graph(): - data_module = PinaDataModule(graph_problem, device='cpu', batch_size=10) - data_module.setup() - loader = data_module.train_dataloader() - for i in loader: - assert len(i) <= 10 - assert isinstance(i.supervised.input_points, list) - assert all(isinstance(x, Graph) for x in i.supervised.input_points) diff --git a/tutorials/tutorial5/tutorial.ipynb b/tutorials/tutorial5/tutorial.ipynb deleted file mode 100644 index d8e98546..00000000 --- a/tutorials/tutorial5/tutorial.ipynb +++ /dev/null @@ -1,445 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "e80567a6", - "metadata": {}, - "source": [ - "# Tutorial: Two dimensional Darcy flow using the Fourier Neural Operator" - ] - }, - { - "cell_type": "markdown", - "id": "8762bbe5", - "metadata": {}, - "source": [ - "In this tutorial we are going to solve the Darcy flow problem in two dimensions, presented in [*Fourier Neural Operator for\n", - "Parametric Partial Differential Equation*](https://openreview.net/pdf?id=c8P9NQVtmnO). First of all we import the modules needed for the tutorial. Importing `scipy` is needed for input-output operations." - ] - }, - { - "cell_type": "code", - "id": "5f2744dc", - "metadata": { - "ExecuteTime": { - "end_time": "2024-10-31T13:30:49.886194Z", - "start_time": "2024-10-31T13:30:48.624214Z" - } - }, - "source": [ - "# !pip install scipy # install scipy\n", - "from scipy import io\n", - "import torch\n", - "from pina.model import FNO, FeedForward # let's import some models\n", - "from pina import Condition, LabelTensor\n", - "from pina.solvers import SupervisedSolver\n", - "from pina.trainer import Trainer\n", - "from pina.problem import AbstractProblem\n", - "import matplotlib.pyplot as plt" - ], - "outputs": [], - "execution_count": 1 - }, - { - "cell_type": "markdown", - "id": "4cf5b181", - "metadata": {}, - "source": [ - "## Data Generation\n", - "\n", - "We will focus on solving a specific PDE, the **Darcy Flow** equation. The Darcy PDE is a second-order elliptic PDE with the following form:\n", - "\n", - "$$\n", - "-\\nabla\\cdot(k(x, y)\\nabla u(x, y)) = f(x) \\quad (x, y) \\in D.\n", - "$$\n", - "\n", - "Specifically, $u$ is the flow pressure, $k$ is the permeability field and $f$ is the forcing function. The Darcy flow can parameterize a variety of systems including flow through porous media, elastic materials and heat conduction. Here you will define the domain as a 2D unit square Dirichlet boundary conditions. The dataset is taken from the authors original reference.\n" - ] - }, - { - "cell_type": "code", - "id": "2ffb8a4c", - "metadata": { - "ExecuteTime": { - "end_time": "2024-10-31T13:30:49.920642Z", - "start_time": "2024-10-31T13:30:49.888843Z" - } - }, - "source": [ - "# download the dataset\n", - "data = io.loadmat(\"Data_Darcy.mat\")\n", - "\n", - "# extract data (we use only 100 data for train)\n", - "k_train = LabelTensor(\n", - " torch.tensor(data['k_train'], dtype=torch.float).unsqueeze(-1),\n", - " labels={3: {'dof': ['u0'], 'name': 'k_train'}})\n", - "u_train = LabelTensor(\n", - " torch.tensor(data['u_train'], dtype=torch.float).unsqueeze(-1),\n", - " labels={3: {'dof': ['u'], 'name': 'u_train'}})\n", - "k_test = LabelTensor(\n", - " torch.tensor(data['k_test'], dtype=torch.float).unsqueeze(-1),\n", - " labels={3: {'dof': ['u0'], 'name': 'k_test'}})\n", - "u_test = LabelTensor(\n", - " torch.tensor(data['u_test'], dtype=torch.float).unsqueeze(-1),\n", - " labels={3: {'dof': ['u'], 'name': 'u_test'}})\n", - "x = torch.tensor(data['x'], dtype=torch.float)[0]\n", - "y = torch.tensor(data['y'], dtype=torch.float)[0]" - ], - "outputs": [], - "execution_count": 2 - }, - { - "cell_type": "markdown", - "id": "9a9defd4", - "metadata": {}, - "source": [ - "Let's visualize some data" - ] - }, - { - "cell_type": "code", - "id": "c8501b6f", - "metadata": { - "ExecuteTime": { - "end_time": "2024-10-31T13:30:50.101674Z", - "start_time": "2024-10-31T13:30:50.034859Z" - } - }, - "source": [ - "plt.subplot(1, 2, 1)\n", - "plt.title('permeability')\n", - "plt.imshow(k_train.squeeze(-1)[0])\n", - "plt.subplot(1, 2, 2)\n", - "plt.title('field solution')\n", - "plt.imshow(u_train.squeeze(-1)[0])\n", - "plt.show()" - ], - "outputs": [ - { - "data": { - "text/plain": [ - "
" - ], - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAiwAAAEjCAYAAAARyVqhAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA73klEQVR4nO3de3RTZbo/8O9O2qaFtilI6QW5FbkI2KIonSpXQUv1IKDDpaPSMoIzHhid1YWjdQkUbz3iURmBA+oMFAdUdAbhzBEZsQocB1AB63Xk0NrSIm1pC73T5rLf3x/+Gg295H1pQ3bD97NWFmTnyc67k+ynT5K9n1cTQggQERERGZjJ1wMgIiIi8oQFCxERERkeCxYiIiIyPBYsREREZHgsWIiIiMjwWLAQERGR4bFgISIiIsNjwUJERESGx4KFiIiIDI8FC3VbWVlZ0DQNlZWVHmMHDRqE9PR01/V9+/ZB0zTs27fPtSw9PR2DBg3q+oESGcxnn32GG2+8ET179oSmacjLy3PtTxdDdt8pKiqCpmnIycm5qMe5GDk5OdA0DUVFRV263smTJ2Py5Mlduk7qGAsWonY0NjYiKyvLragh6u7sdjvmzJmDs2fP4sUXX8Rf/vIXDBw40NfDMqRvv/0WWVlZXV7s0MUJ8PUAiC6F48ePw2TquD5/9dVXoeu663pjYyNWrVoFAPwkRX6joKAAJ0+exKuvvopFixa5lj/++ON49NFHfTgy4/n222+xatUqTJ48udU3SO+//75vBnUZY8FCHjU2NqJHjx6+HkanWCwWjzGBgYGXYCREvnXmzBkAQEREhNvygIAABATwT4KsoKAgXw/hssOfhLq5lt+dv/vuO8ydOxfh4eG44oor8NBDD6GpqcktduvWrRg7dixCQkLQu3dvzJ8/HyUlJW4xkydPxujRo3H06FFMnDgRPXr0wGOPPeb67fk///M/sX79esTFxaFHjx649dZbUVJSAiEEnnzySVx55ZUICQnBzJkzcfbs2Vbjfe+99zBhwgT07NkTYWFhuP322/HNN9+4xXz55ZdIT09HXFwcgoODER0djV//+teoqqpq8zmorKz0uO0XHsPSlp//Dl9UVITIyEgAwKpVq6BpGjRNQ1ZWFjZv3gxN0/D555+3WsczzzwDs9mMH374ocPHIvKF9PR0TJo0CQAwZ84caJrm+vawvWNYZPJGW6qrq5Geng6r1YqIiAikpaWhurpaapx2ux2rVq3C0KFDERwcjCuuuALjx4/H3r173eI+/PBDVz6JiIjAzJkz8a9//cvj+lv25Qv9PE/k5ORgzpw5AIApU6a4ckDLT8RtHcNy5swZ3HfffYiKikJwcDASEhKwZcsWt5if59JXXnkFQ4YMgcViwQ033IDPPvtM6vm5XLGc9hNz587FoEGDkJ2djcOHD+Oll17CuXPn8NprrwEAnn76aSxfvhxz587FokWLUFFRgbVr12LixIn4/PPP3T5tVVVVISUlBfPnz8c999yDqKgo123btm2DzWbD7373O5w9exarV6/G3LlzcfPNN2Pfvn145JFHkJ+fj7Vr12LZsmXYtGmT675/+ctfkJaWhuTkZDz77LNobGzEhg0bMH78eHz++eeuYmHv3r34/vvvsXDhQkRHR+Obb77BK6+8gm+++QaHDx9ulVQ9bfvFiIyMxIYNG/DAAw9g9uzZuPPOOwEA8fHxGDx4MJYsWYJt27bh2muvdbvftm3bMHnyZPTr1++iH5vIW37zm9+gX79+eOaZZ/Dggw/ihhtucNu/L6SSN35OCIGZM2fi448/xm9/+1tcffXVeOedd5CWliY1zqysLGRnZ2PRokUYN24camtrceTIERw7dgy33HILAOCDDz5ASkoK4uLikJWVhfPnz2Pt2rW46aabcOzYsU4fQD9x4kQ8+OCDeOmll/DYY4/h6quvBgDXvxc6f/48Jk+ejPz8fCxduhSDBw/G22+/jfT0dFRXV+Ohhx5yi3/99ddRV1eH3/zmN9A0DatXr8add96J77//nt/2tkdQt7Zy5UoBQNxxxx1uy//93/9dABBffPGFKCoqEmazWTz99NNuMV999ZUICAhwWz5p0iQBQGzcuNEttrCwUAAQkZGRorq62rU8MzNTABAJCQnCbre7lqempoqgoCDR1NQkhBCirq5OREREiMWLF7utt6ysTFitVrfljY2NrbbzjTfeEADEgQMHlLa9xcCBA0VaWprr+kcffSQAiI8++si1LC0tTQwcONB1vaKiQgAQK1eubDWe1NRUERsbK5xOp2vZsWPHBACxefPmVvFERtHy3n/77bfdlrfsTy1U8saF+87OnTsFALF69WrXMofDISZMmCC1jyQkJIjbb7+9w5gxY8aIvn37iqqqKteyL774QphMJrFgwQLXss2bNwsAorCw0LWsvf36wjzx9ttvt8oTLSZNmiQmTZrkur5mzRoBQGzdutW1zGaziaSkJBEaGipqa2uFED/l0iuuuEKcPXvWFbtr1y4BQPz973/vcLsvZ/xJyE8sWbLE7frvfvc7AMDu3buxY8cO6LqOuXPnorKy0nWJjo7G0KFD8dFHH7nd12KxYOHChW0+zpw5c2C1Wl3XExMTAQD33HOP2+/fiYmJsNlsrp9G9u7di+rqaqSmprqNwWw2IzEx0W0MISEhrv83NTWhsrISv/jFLwAAx44dU9p2b1mwYAFOnz7tNu5t27YhJCQEd911l9cel+hSUc0bP7d7924EBATggQcecC0zm82ufdOTiIgIfPPNNzhx4kSbt5eWliIvLw/p6eno3bu3a3l8fDxuueUWr+777dm9ezeio6ORmprqWhYYGIgHH3wQ9fX12L9/v1v8vHnz0KtXL9f1CRMmAAC+//77SzPgbog/CfmJoUOHul0fMmQITCYTioqKYDKZIIRoFdPiwq8f+/Xr1+4BZQMGDHC73lK89O/fv83l586dAwBX4rn55pvbXG94eLjr/2fPnsWqVavw5ptvug4QbFFTU9Pqvh1tu7fccsstiImJwbZt2zB16lTouo433ngDM2fORFhYmNcel+hSOXHihFLe+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vvtuFBcX+3pIXlNYWIiysjK319NqtSIxMdFvXk8A2LdvH/r27Yvhw4fjgQceQFVVla+HdFm5HPIGcPnkDuYN/+OXBUtlZSWcTieioqLclkdFRaGsrMxHo+o6iYmJyMnJwZ49e7BhwwYUFhZiwoQJqKur8/XQvKLlNfPX1xP48Wvd1157Dbm5uXj22Wexf/9+pKSkwOl0+npolw1/zxvA5ZU7mDf8T4CvB0DqUlJSXP+Pj49HYmIiBg4ciLfeegv33XefD0dGF2v+/Pmu/19zzTWIj4/HkCFDsG/fPkydOtWHIyN/wtzhXy63vOGX37D06dMHZrMZ5eXlbsvLy8sRHR3to1F5T0REBIYNG4b8/HxfD8UrWl6zy+X1BIC4uDj06dPHb19TI7rc8gbg37mDecP/+GXBEhQUhLFjxyI3N9e1TNd15ObmIikpyYcj8476+noUFBQgJibG10PxisGDByM6Otrt9aytrcUnn3zil68nAJw6dQpVVVV++5oa0eWWNwD/zh3MG/7Hb38SysjIQFpaGq6//nqMGzcOa9asQUNDAxYuXOjroXXasmXLMGPGDAwcOBCnT5/GypUrYTabkZqa6uuhXbT6+nq3TwWFhYXIy8tD7969MWDAAPz+97/HU089haFDh2Lw4MFYvnw5YmNjMWvWLN8NWkFH29e7d2+sWrUKd911F6Kjo1FQUIA//OEPuOqqq5CcnOzDUV9+/DlvAP6XO5g3LrO84evTlLxp7dq1YsCAASIoKEiMGzdOHD582NdD6hLz5s0TMTExIigoSPTr10/MmzdP5Ofn+3pYnfLRRx8JAK0uaWlpQogfT1Fcvny5iIqKEhaLRUydOlUcP37ct4NW0NH2NTY2iltvvVVERkaKwMBAMXDgQLF48WJRVlbm62Fflvw1bwjhf7mDeePyyhuaEEJc2hKJiIiISI1fHsNCRERE/oUFCxERERkeCxYiIiIyPBYsREREZHgsWIiIiMjwWLAQERGR4bFgISIiIsNjwUJERESGx4KFiIiIDI8FCxERERkeCxYiIiIyvP8HXODpCG4iMjAAAAAASUVORK5CYII=" - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "execution_count": 3 - }, - { - "cell_type": "markdown", - "id": "89a77ff1", - "metadata": {}, - "source": [ - "We now create the neural operator class. It is a very simple class, inheriting from `AbstractProblem`." - ] - }, - { - "cell_type": "code", - "id": "8b27d283", - "metadata": { - "ExecuteTime": { - "end_time": "2024-10-31T13:30:50.191764Z", - "start_time": "2024-10-31T13:30:50.189977Z" - } - }, - "source": [ - "class NeuralOperatorSolver(AbstractProblem):\n", - " input_variables = k_train.labels\n", - " output_variables = u_train.labels\n", - " conditions = {'data': Condition(input_points=k_train,\n", - " output_points=u_train)}\n", - "\n", - "\n", - "# make problem\n", - "problem = NeuralOperatorSolver()" - ], - "outputs": [], - "execution_count": 4 - }, - { - "cell_type": "markdown", - "id": "1096cc20", - "metadata": {}, - "source": [ - "## Solving the problem with a FeedForward Neural Network\n", - "\n", - "We will first solve the problem using a Feedforward neural network. We will use the `SupervisedSolver` for solving the problem, since we are training using supervised learning." - ] - }, - { - "cell_type": "code", - "id": "e34f18b0", - "metadata": { - "ExecuteTime": { - "end_time": "2024-10-31T13:30:52.528635Z", - "start_time": "2024-10-31T13:30:50.225049Z" - } - }, - "source": [ - "# make model\n", - "model = FeedForward(input_dimensions=1, output_dimensions=1)\n", - "\n", - "# make solver\n", - "solver = SupervisedSolver(problem=problem, model=model)\n", - "\n", - "# make the trainer and train\n", - "trainer = Trainer(solver=solver, max_epochs=10, accelerator='cpu',\n", - " enable_model_summary=False, batch_size=10, train_size=1.,\n", - " test_size=0., val_size=0.)\n", - "# We train on CPU and avoid model summary at the beginning of training (optional)\n", - "trainer.train()" - ], - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "GPU available: True (mps), used: False\n", - "TPU available: False, using: 0 TPU cores\n", - "HPU available: False, using: 0 HPUs\n", - "/Users/filippoolivo/miniconda3/envs/PINAv0.2-test/lib/python3.11/site-packages/pytorch_lightning/trainer/setup.py:177: GPU available but not used. You can set it by doing `Trainer(accelerator='gpu')`.\n", - "/Users/filippoolivo/miniconda3/envs/PINAv0.2-test/lib/python3.11/site-packages/pytorch_lightning/trainer/connectors/logger_connector/logger_connector.py:75: Starting from v1.9.0, `tensorboardX` has been removed as a dependency of the `pytorch_lightning` package, due to potential conflicts with other packages in the ML ecosystem. For this reason, `logger=True` will use `CSVLogger` as the default logger, unless the `tensorboard` or `tensorboardX` packages are found. Please `pip install lightning[extra]` or one of them to enable TensorBoard support by default\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 9: 100%|██████████| 100/100 [00:00<00:00, 459.79it/s, v_num=58, mean_loss=0.108]" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "`Trainer.fit` stopped: `max_epochs=10` reached.\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 9: 100%|██████████| 100/100 [00:00<00:00, 456.20it/s, v_num=58, mean_loss=0.108]\n" - ] - } - ], - "execution_count": 5 - }, - { - "cell_type": "markdown", - "id": "7b2c35be", - "metadata": {}, - "source": [ - "The final loss is pretty high... We can calculate the error by importing `LpLoss`." - ] - }, - { - "cell_type": "code", - "id": "0e2a6aa4", - "metadata": { - "ExecuteTime": { - "end_time": "2024-10-31T13:30:52.600181Z", - "start_time": "2024-10-31T13:30:52.564456Z" - } - }, - "source": [ - "from pina.loss import LpLoss\n", - "\n", - "# make the metric\n", - "metric_err = LpLoss(relative=True)\n", - "\n", - "model = solver.models[0]\n", - "err = float(\n", - " metric_err(u_train.squeeze(-1), model(k_train).squeeze(-1)).mean()) * 100\n", - "print(f'Final error training {err:.2f}%')\n", - "\n", - "err = float(\n", - " metric_err(u_test.squeeze(-1), model(k_test).squeeze(-1)).mean()) * 100\n", - "print(f'Final error testing {err:.2f}%')" - ], - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Final error training 56.05%\n", - "Final error testing 56.02%\n" - ] - } - ], - "execution_count": 6 - }, - { - "cell_type": "markdown", - "id": "6b5e5aa6", - "metadata": {}, - "source": [ - "## Solving the problem with a Fourier Neural Operator (FNO)\n", - "\n", - "We will now move to solve the problem using a FNO. Since we are learning operator this approach is better suited, as we shall see." - ] - }, - { - "cell_type": "code", - "id": "9af523a5", - "metadata": { - "ExecuteTime": { - "end_time": "2024-10-31T13:31:06.537460Z", - "start_time": "2024-10-31T13:30:52.694424Z" - } - }, - "source": [ - "# make model\n", - "lifting_net = torch.nn.Linear(1, 24)\n", - "projecting_net = torch.nn.Linear(24, 1)\n", - "model = FNO(lifting_net=lifting_net,\n", - " projecting_net=projecting_net,\n", - " n_modes=8,\n", - " dimensions=2,\n", - " inner_size=24,\n", - " padding=8)\n", - "\n", - "# make solver\n", - "solver = SupervisedSolver(problem=problem, model=model)\n", - "\n", - "# make the trainer and train\n", - "trainer = Trainer(solver=solver, max_epochs=10, accelerator='cpu',\n", - " enable_model_summary=False, batch_size=10, train_size=1.,\n", - " test_size=0.,\n", - " val_size=0.) # we train on CPU and avoid model summary at beginning of training (optional)\n", - "trainer.train()" - ], - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "GPU available: True (mps), used: False\n", - "TPU available: False, using: 0 TPU cores\n", - "HPU available: False, using: 0 HPUs\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 9: 100%|██████████| 100/100 [00:01<00:00, 72.88it/s, v_num=59, mean_loss=0.00291]" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "`Trainer.fit` stopped: `max_epochs=10` reached.\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 9: 100%|██████████| 100/100 [00:01<00:00, 72.69it/s, v_num=59, mean_loss=0.00291]\n" - ] - } - ], - "execution_count": 7 - }, - { - "cell_type": "markdown", - "id": "84964cb9", - "metadata": {}, - "source": [ - "We can clearly see that the final loss is lower. Let's see in testing.. Notice that the number of parameters is way higher than a `FeedForward` network. We suggest to use GPU or TPU for a speed up in training, when many data samples are used." - ] - }, - { - "cell_type": "code", - "id": "58e2db89", - "metadata": { - "ExecuteTime": { - "end_time": "2024-10-31T13:31:07.134298Z", - "start_time": "2024-10-31T13:31:06.657198Z" - } - }, - "source": [ - "model = solver.models[0]\n", - "\n", - "err = float(\n", - " metric_err(u_train.squeeze(-1), model(k_train).squeeze(-1)).mean()) * 100\n", - "print(f'Final error training {err:.2f}%')\n", - "\n", - "err = float(\n", - " metric_err(u_test.squeeze(-1), model(k_test).squeeze(-1)).mean()) * 100\n", - "print(f'Final error testing {err:.2f}%')" - ], - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Final error training 7.21%\n", - "Final error testing 7.39%\n" - ] - } - ], - "execution_count": 8 - }, - { - "cell_type": "markdown", - "id": "26e3a6e4", - "metadata": {}, - "source": [ - "As we can see the loss is way lower!" - ] - }, - { - "cell_type": "markdown", - "id": "ba1dfa4b", - "metadata": {}, - "source": [ - "## What's next?\n", - "\n", - "We have made a very simple example on how to use the `FNO` for learning neural operator. Currently in **PINA** we implement 1D/2D/3D cases. We suggest to extend the tutorial using more complex problems and train for longer, to see the full potential of neural operators." - ] - }, - { - "metadata": { - "ExecuteTime": { - "end_time": "2024-10-31T13:31:07.231206Z", - "start_time": "2024-10-31T13:31:07.230017Z" - } - }, - "cell_type": "code", - "source": "", - "id": "af932a706dd1b71f", - "outputs": [], - "execution_count": null - } - ], - "metadata": { - "interpreter": { - "hash": "aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49" - }, - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -}