From d10c525e74df829648425ef51ed943090936d37a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 23 Apr 2025 18:48:47 +0200 Subject: [PATCH] export tutorials changed in dd88513 (#559) Co-authored-by: dario-coscia --- docs/source/tutorials/tutorial1/tutorial.html | 535 +- .../source/tutorials/tutorial10/tutorial.html | 144 +- .../source/tutorials/tutorial11/tutorial.html | 445 +- .../source/tutorials/tutorial12/tutorial.html | 178 +- .../source/tutorials/tutorial13/tutorial.html | 161 +- .../source/tutorials/tutorial14/tutorial.html | 789 +- .../source/tutorials/tutorial15/tutorial.html | 8379 ++++++++++++++++ .../source/tutorials/tutorial16/tutorial.html | 8156 ++++++++++++++++ .../source/tutorials/tutorial17/tutorial.html | 8499 +++++++++++++++++ .../source/tutorials/tutorial18/tutorial.html | 8004 ++++++++++++++++ .../source/tutorials/tutorial19/tutorial.html | 8233 ++++++++++++++++ docs/source/tutorials/tutorial2/tutorial.html | 108 +- .../source/tutorials/tutorial20/tutorial.html | 8030 ++++++++++++++++ .../source/tutorials/tutorial21/tutorial.html | 8014 ++++++++++++++++ docs/source/tutorials/tutorial3/tutorial.html | 145 +- docs/source/tutorials/tutorial4/tutorial.html | 458 +- docs/source/tutorials/tutorial5/tutorial.html | 99 +- docs/source/tutorials/tutorial6/tutorial.html | 111 +- docs/source/tutorials/tutorial7/tutorial.html | 147 +- docs/source/tutorials/tutorial8/tutorial.html | 190 +- docs/source/tutorials/tutorial9/tutorial.html | 192 +- tutorials/tutorial1/tutorial.ipynb | 4 +- tutorials/tutorial1/tutorial.py | 265 + tutorials/tutorial10/tutorial.py | 305 + tutorials/tutorial11/tutorial.ipynb | 2 +- tutorials/tutorial11/tutorial.py | 358 + tutorials/tutorial12/tutorial.py | 220 + tutorials/tutorial13/tutorial.py | 294 + tutorials/tutorial14/tutorial.ipynb | 16 +- tutorials/tutorial14/tutorial.py | 282 + tutorials/tutorial15/tutorial.ipynb | 10 +- tutorials/tutorial15/tutorial.py | 315 + tutorials/tutorial16/tutorial.ipynb | 12 +- tutorials/tutorial16/tutorial.py | 336 + tutorials/tutorial17/tutorial.ipynb | 72 +- tutorials/tutorial17/tutorial.py | 553 ++ tutorials/tutorial18/tutorial.ipynb | 9 +- tutorials/tutorial18/tutorial.py | 300 + tutorials/tutorial19/tutorial.ipynb | 18 +- tutorials/tutorial19/tutorial.py | 308 + tutorials/tutorial2/tutorial.py | 362 + tutorials/tutorial20/tutorial.ipynb | 11 +- tutorials/tutorial20/tutorial.py | 275 + tutorials/tutorial21/tutorial.ipynb | 9 +- tutorials/tutorial21/tutorial.py | 303 + tutorials/tutorial3/tutorial.py | 347 + tutorials/tutorial4/tutorial.py | 670 ++ tutorials/tutorial5/tutorial.py | 220 + tutorials/tutorial6/tutorial.ipynb | 1 + tutorials/tutorial6/tutorial.py | 290 + tutorials/tutorial7/tutorial.py | 278 + tutorials/tutorial8/tutorial.py | 294 + tutorials/tutorial9/tutorial.py | 254 + 53 files changed, 65690 insertions(+), 2320 deletions(-) create mode 100644 docs/source/tutorials/tutorial15/tutorial.html create mode 100644 docs/source/tutorials/tutorial16/tutorial.html create mode 100644 docs/source/tutorials/tutorial17/tutorial.html create mode 100644 docs/source/tutorials/tutorial18/tutorial.html create mode 100644 docs/source/tutorials/tutorial19/tutorial.html create mode 100644 docs/source/tutorials/tutorial20/tutorial.html create mode 100644 docs/source/tutorials/tutorial21/tutorial.html create mode 100644 tutorials/tutorial1/tutorial.py create mode 100644 tutorials/tutorial10/tutorial.py create mode 100644 tutorials/tutorial11/tutorial.py create mode 100644 tutorials/tutorial12/tutorial.py create mode 100644 tutorials/tutorial13/tutorial.py create mode 100644 tutorials/tutorial14/tutorial.py create mode 100644 tutorials/tutorial15/tutorial.py create mode 100644 tutorials/tutorial16/tutorial.py create mode 100644 tutorials/tutorial17/tutorial.py create mode 100644 tutorials/tutorial18/tutorial.py create mode 100644 tutorials/tutorial19/tutorial.py create mode 100644 tutorials/tutorial2/tutorial.py create mode 100644 tutorials/tutorial20/tutorial.py create mode 100644 tutorials/tutorial21/tutorial.py create mode 100644 tutorials/tutorial3/tutorial.py create mode 100644 tutorials/tutorial4/tutorial.py create mode 100644 tutorials/tutorial5/tutorial.py create mode 100644 tutorials/tutorial6/tutorial.py create mode 100644 tutorials/tutorial7/tutorial.py create mode 100644 tutorials/tutorial8/tutorial.py create mode 100644 tutorials/tutorial9/tutorial.py diff --git a/docs/source/tutorials/tutorial1/tutorial.html b/docs/source/tutorials/tutorial1/tutorial.html index d8010e1..3d8bffc 100644 --- a/docs/source/tutorials/tutorial1/tutorial.html +++ b/docs/source/tutorials/tutorial1/tutorial.html @@ -7544,7 +7544,10 @@ a.anchor-link {
@@ -7555,64 +7558,12 @@ a.anchor-link {
- -
- -
-
- -
+
-
+ - -
+
+
+
+ +
+ +
+
+ +
+ + -
@@ -7973,7 +7964,7 @@ var element = document.getElementById('247939a9-6568-4a72-bda0-641ef97df37c'); @@ -7985,7 +7976,7 @@ var element = document.getElementById('247939a9-6568-4a72-bda0-641ef97df37c'); @@ -8025,8 +8016,8 @@ Let's take a look at the training and testing error:

@@ -8039,7 +8030,7 @@ Testing error: 0.158 @@ -8050,15 +8041,16 @@ Testing error: 0.158
@@ -8066,6 +8058,6 @@ Testing error: 0.158 diff --git a/docs/source/tutorials/tutorial11/tutorial.html b/docs/source/tutorials/tutorial11/tutorial.html index 5b4e5b5..aa46e05 100644 --- a/docs/source/tutorials/tutorial11/tutorial.html +++ b/docs/source/tutorials/tutorial11/tutorial.html @@ -7544,11 +7544,13 @@ a.anchor-link {
@@ -7567,18 +7569,15 @@ a.anchor-link { except: IN_COLAB = False if IN_COLAB: - !pip install "pina-mathlab" + !pip install "pina-mathlab[tutorial]" import torch import warnings -from pina import Condition, Trainer -from pina.solver import PINN +from pina import Trainer +from pina.solver import SupervisedSolver from pina.model import FeedForward -from pina.problem import SpatialProblem -from pina.operator import grad -from pina.domain import CartesianDomain -from pina.equation import Equation, FixedValue +from pina.problem.zoo import SupervisedProblem warnings.filterwarnings("ignore") @@ -7605,55 +7604,22 @@ a.anchor-link {
In [2]:
-
# defining the ode equation
-def ode_equation(input_, output_):
+
# defining the problem
+x_train = torch.empty((20, 1)).uniform_(-3, 3)
+y_train = x_train.pow(3) + 3 * torch.randn_like(x_train)
 
-    # computing the derivative
-    u_x = grad(output_, input_, components=["u"], d=["x"])
-
-    # extracting the u input variable
-    u = output_.extract(["u"])
-
-    # calculate the residual and return it
-    return u_x - u
-
-
-class SimpleODE(SpatialProblem):
-
-    output_variables = ["u"]
-    spatial_domain = CartesianDomain({"x": [0, 1]})
-
-    domains = {
-        "x0": CartesianDomain({"x": 0.0}),
-        "D": CartesianDomain({"x": [0, 1]}),
-    }
-
-    # conditions to hold
-    conditions = {
-        "bound_cond": Condition(domain="x0", equation=FixedValue(1.0)),
-        "phys_cond": Condition(domain="D", equation=Equation(ode_equation)),
-    }
-
-    # defining the true solution
-    def solution(self, pts):
-        return torch.exp(pts.extract(["x"]))
-
-
-# sampling for training
-problem = SimpleODE()
-problem.discretise_domain(1, "random", domains=["x0"])
-problem.discretise_domain(20, "lh", domains=["D"])
+problem = SupervisedProblem(x_train, y_train)
 
 # build the model
 model = FeedForward(
     layers=[10, 10],
     func=torch.nn.Tanh,
-    output_dimensions=len(problem.output_variables),
-    input_dimensions=len(problem.input_variables),
+    output_dimensions=1,
+    input_dimensions=1,
 )
 
-# create the PINN object
-pinn = PINN(problem, model)
+# create the SupervisedSolver object
+solver = SupervisedSolver(problem, model, use_lt=False)
 
@@ -7667,7 +7633,7 @@ a.anchor-link {
@@ -7679,7 +7645,7 @@ can be initialized by simiply passing the PINN solver

In [3]:
-
trainer = Trainer(solver=pinn)
+
trainer = Trainer(solver=solver)
 
@@ -7692,6 +7658,13 @@ can be initialized by simiply passing the PINN solver

+ -
- -
- @@ -7993,7 +7978,7 @@ var element = document.getElementById('0ba179f6-fcc7-4775-af21-2ffeb47a945f'); @@ -8005,40 +7990,18 @@ var element = document.getElementById('0ba179f6-fcc7-4775-af21-2ffeb47a945f');
-
- - -
- -
-
- @@ -8078,7 +8041,7 @@ Lightning has a callback system to execute them when needed. Callbacks should ca
@@ -8093,12 +8056,12 @@ Lightning has a callback system to execute them when needed. Callbacks should ca
model = FeedForward(
     layers=[10, 10],
     func=torch.nn.Tanh,
-    output_dimensions=len(problem.output_variables),
-    input_dimensions=len(problem.input_variables),
+    output_dimensions=1,
+    input_dimensions=1,
 )
-pinn = PINN(problem, model)
+solver = SupervisedSolver(problem, model, use_lt=False)
 trainer = Trainer(
-    solver=pinn,
+    solver=solver,
     accelerator="cpu",
     logger=True,
     callbacks=[NaiveMetricTracker()],  # adding a callbacks
@@ -8106,6 +8069,7 @@ Lightning has a callback system to execute them when needed. Callbacks should ca
     train_size=1.0,
     val_size=0.0,
     test_size=0.0,
+    max_epochs=10,  # training only for 10 epochs
 )
 trainer.train()
 
@@ -8120,6 +8084,13 @@ Lightning has a callback system to execute them when needed. Callbacks should ca
+
+
+ + @@ -8140,26 +8111,19 @@ Lightning has a callback system to execute them when needed. Callbacks should ca
- -
-
- - @@ -8197,15 +8161,9 @@ var element = document.getElementById('8aaf4f60-47e8-4bd6-9cb3-e61ef0110c23');
@@ -8217,8 +8175,8 @@ var element = document.getElementById('8aaf4f60-47e8-4bd6-9cb3-e61ef0110c23');
@@ -8233,12 +8191,12 @@ var element = document.getElementById('8aaf4f60-47e8-4bd6-9cb3-e61ef0110c23');
model = FeedForward(
     layers=[10, 10],
     func=torch.nn.Tanh,
-    output_dimensions=len(problem.output_variables),
-    input_dimensions=len(problem.input_variables),
+    output_dimensions=1,
+    input_dimensions=1,
 )
-pinn = PINN(problem, model)
+solver = SupervisedSolver(problem, model, use_lt=False)
 trainer = Trainer(
-    solver=pinn,
+    solver=solver,
     accelerator="cpu",
     max_epochs=-1,
     enable_model_summary=False,
@@ -8261,6 +8219,13 @@ var element = document.getElementById('8aaf4f60-47e8-4bd6-9cb3-e61ef0110c23');
 
+
 
 
@@ -8330,16 +8295,16 @@ We use the model = FeedForward( layers=[10, 10], func=torch.nn.Tanh, - output_dimensions=len(problem.output_variables), - input_dimensions=len(problem.input_variables), + output_dimensions=1, + input_dimensions=1, ) -pinn = PINN(problem, model) +solver = SupervisedSolver(problem, model, use_lt=False) trainer = Trainer( - solver=pinn, + solver=solver, accelerator="cpu", deterministic=True, # setting deterministic=True ensure reproducibility when a seed is imposed - max_epochs=2000, + max_epochs=500, enable_model_summary=False, callbacks=[Timer()], ) # adding a callbacks @@ -8364,6 +8329,13 @@ We use the + +
+ + @@ -8384,26 +8356,26 @@ We use the - @@ -8416,7 +8388,7 @@ var element = document.getElementById('7011d2a2-b434-4b6f-82ec-45a209372a18');
@@ -8436,15 +8408,15 @@ var element = document.getElementById('7011d2a2-b434-4b6f-82ec-45a209372a18'); model = FeedForward( layers=[10, 10], func=torch.nn.Tanh, - output_dimensions=len(problem.output_variables), - input_dimensions=len(problem.input_variables), + output_dimensions=1, + input_dimensions=1, ) -pinn = PINN(problem, model) +solver = SupervisedSolver(problem, model, use_lt=False) trainer = Trainer( - solver=pinn, + solver=solver, accelerator="cpu", deterministic=True, - max_epochs=2000, + max_epochs=500, enable_model_summary=False, callbacks=[Timer(), StochasticWeightAveraging(swa_lrs=0.005)], ) # adding StochasticWeightAveraging callbacks @@ -8469,6 +8441,13 @@ var element = document.getElementById('7011d2a2-b434-4b6f-82ec-45a209372a18'); + @@ -8549,14 +8528,14 @@ This is because by default StochasticWeightAveraging will be activa model = FeedForward( layers=[10, 10], func=torch.nn.Tanh, - output_dimensions=len(problem.output_variables), - input_dimensions=len(problem.input_variables), + output_dimensions=1, + input_dimensions=1, ) -pinn = PINN(problem, model) +solver = SupervisedSolver(problem, model, use_lt=False) trainer = Trainer( - solver=pinn, + solver=solver, accelerator="cpu", - max_epochs=2000, + max_epochs=500, enable_model_summary=False, gradient_clip_val=0.1, # clipping the gradient callbacks=[Timer(), StochasticWeightAveraging(swa_lrs=0.005)], @@ -8582,6 +8561,13 @@ This is because by default StochasticWeightAveraging will be activa +
@@ -8658,6 +8647,6 @@ var element = document.getElementById('4e5ab008-430b-409c-817b-9d6db52b6eb0'); diff --git a/docs/source/tutorials/tutorial12/tutorial.html b/docs/source/tutorials/tutorial12/tutorial.html index b34b5f3..03267fd 100644 --- a/docs/source/tutorials/tutorial12/tutorial.html +++ b/docs/source/tutorials/tutorial12/tutorial.html @@ -7517,46 +7517,16 @@ a.anchor-link {
-
- - -
- -
-
- -
-
-
+ +
+
+
+ +
+ +
+
@@ -8144,6 +8145,6 @@ var element = document.getElementById('becbb018-84a3-4bdf-b652-1b6d5a2ff019'); diff --git a/docs/source/tutorials/tutorial14/tutorial.html b/docs/source/tutorials/tutorial14/tutorial.html index e2fcd5e..5d54218 100644 --- a/docs/source/tutorials/tutorial14/tutorial.html +++ b/docs/source/tutorials/tutorial14/tutorial.html @@ -3,7 +3,34 @@ -tutorial +tutorial + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+ + + diff --git a/docs/source/tutorials/tutorial16/tutorial.html b/docs/source/tutorials/tutorial16/tutorial.html new file mode 100644 index 0000000..68a069a --- /dev/null +++ b/docs/source/tutorials/tutorial16/tutorial.html @@ -0,0 +1,8156 @@ + + + + + +tutorial + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +
+ + diff --git a/docs/source/tutorials/tutorial17/tutorial.html b/docs/source/tutorials/tutorial17/tutorial.html new file mode 100644 index 0000000..1da0242 --- /dev/null +++ b/docs/source/tutorials/tutorial17/tutorial.html @@ -0,0 +1,8499 @@ + + + + + +tutorial + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+ + + diff --git a/docs/source/tutorials/tutorial18/tutorial.html b/docs/source/tutorials/tutorial18/tutorial.html new file mode 100644 index 0000000..e44f7a5 --- /dev/null +++ b/docs/source/tutorials/tutorial18/tutorial.html @@ -0,0 +1,8004 @@ + + + + + +tutorial + + + + + + + + + + + + +
+ + + + + + +
+ + + diff --git a/docs/source/tutorials/tutorial19/tutorial.html b/docs/source/tutorials/tutorial19/tutorial.html new file mode 100644 index 0000000..6c6f7ec --- /dev/null +++ b/docs/source/tutorials/tutorial19/tutorial.html @@ -0,0 +1,8233 @@ + + + + + +tutorial + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + +
+ + diff --git a/docs/source/tutorials/tutorial2/tutorial.html b/docs/source/tutorials/tutorial2/tutorial.html index 92225e6..7e50103 100644 --- a/docs/source/tutorials/tutorial2/tutorial.html +++ b/docs/source/tutorials/tutorial2/tutorial.html @@ -7544,7 +7544,7 @@ a.anchor-link {
@@ -7566,7 +7566,7 @@ a.anchor-link { except: IN_COLAB = False if IN_COLAB: - !pip install "pina-mathlab" + !pip install "pina-mathlab[tutorial]" import torch import matplotlib.pyplot as plt @@ -7610,7 +7610,7 @@ u = 0 \text{ on } \Gamma_1 \cup \Gamma_2 \cup \Gamma_3 \cup \Gamma_4, \end{equation} where $D$ is a square domain $[0,1]^2$, and $\Gamma_i$, with $i=1,...,4$, are the boundaries of the square.

The Poisson problem is written in PINA code as a class. The equations are written as conditions that should be satisfied in the corresponding domains. The solution -is the exact solution which will be compared with the predicted one. If interested in how to write problems see this tutorial.

+is the exact solution which will be compared with the predicted one. If interested in how to write problems see this tutorial.

We will directly import the problem from pina.problem.zoo, which contains a vast list of PINN problems and more.

@@ -7730,6 +7730,13 @@ They are: ['g1', 'g2', 'g3', 'g4', 'D']
+
+
+ + @@ -7750,19 +7757,12 @@ They are: ['g1', 'g2', 'g3', 'g4', 'D']
- -
-
- - @@ -7783,7 +7783,7 @@ var element = document.getElementById('21603e2d-ac88-4b39-9dab-afa97865b91b');
@@ -7857,7 +7857,7 @@ The solution predicted by the neural network is plotted on the left, the exact o
@@ -7971,6 +7971,13 @@ The set of input variables to the neural network is:

+
+
+ + @@ -7991,12 +7998,12 @@ The set of input variables to the neural network is:

- @@ -8043,7 +8050,7 @@ We can easily note that now our network, having almost the same condition as bef
@@ -8141,6 +8148,13 @@ Their implementation is quite trivial: by using the class torch.nn.Paramet + @@ -8424,6 +8446,6 @@ var element = document.getElementById('a93ab4ce-a973-4a51-8357-d48f59c50c97'); diff --git a/docs/source/tutorials/tutorial20/tutorial.html b/docs/source/tutorials/tutorial20/tutorial.html new file mode 100644 index 0000000..a3646f5 --- /dev/null +++ b/docs/source/tutorials/tutorial20/tutorial.html @@ -0,0 +1,8030 @@ + + + + + +tutorial + + + + + + + + + + + + +
+ + + + + + + + +
+ + + diff --git a/docs/source/tutorials/tutorial21/tutorial.html b/docs/source/tutorials/tutorial21/tutorial.html new file mode 100644 index 0000000..8db72c2 --- /dev/null +++ b/docs/source/tutorials/tutorial21/tutorial.html @@ -0,0 +1,8014 @@ + + + + + +tutorial + + + + + + + + + + + + +
+ + + + + + +
+ + + diff --git a/docs/source/tutorials/tutorial3/tutorial.html b/docs/source/tutorials/tutorial3/tutorial.html index 44c63ce..20e1c3c 100644 --- a/docs/source/tutorials/tutorial3/tutorial.html +++ b/docs/source/tutorials/tutorial3/tutorial.html @@ -7544,8 +7544,8 @@ a.anchor-link { @@ -7566,7 +7566,7 @@ a.anchor-link { except: IN_COLAB = False if IN_COLAB: - !pip install "pina-mathlab" + !pip install "pina-mathlab[tutorial]" import torch import matplotlib.pyplot as plt @@ -7593,18 +7593,7 @@ a.anchor-link { - - - - - - - - - - @@ -7999,19 +7961,19 @@ var element = document.getElementById('41671991-3a89-4a34-bbcc-76999f526715'); @@ -8023,10 +7985,12 @@ var element = document.getElementById('41671991-3a89-4a34-bbcc-76999f526715'); @@ -8121,6 +8085,13 @@ var element = document.getElementById('41671991-3a89-4a34-bbcc-76999f526715'); + @@ -8222,7 +8193,7 @@ var element = document.getElementById('40c29b39-b220-4bdf-baca-d9c01271286d'); @@ -8233,17 +8204,21 @@ var element = document.getElementById('40c29b39-b220-4bdf-baca-d9c01271286d'); @@ -8251,6 +8226,6 @@ var element = document.getElementById('40c29b39-b220-4bdf-baca-d9c01271286d'); diff --git a/docs/source/tutorials/tutorial4/tutorial.html b/docs/source/tutorials/tutorial4/tutorial.html index 34a3638..cd619d9 100644 --- a/docs/source/tutorials/tutorial4/tutorial.html +++ b/docs/source/tutorials/tutorial4/tutorial.html @@ -7544,7 +7544,7 @@ a.anchor-link { @@ -7556,16 +7556,6 @@ a.anchor-link { - - - - - - - - - - - @@ -7895,7 +7867,7 @@ Filter output data has shape: torch.Size([1, 1, 169, 3]) @@ -7942,17 +7914,7 @@ Filter output data has shape: torch.Size([1, 1, 169, 3]) - - - @@ -8848,18 +8720,8 @@ var element = document.getElementById('35bf8e3a-c090-41af-9004-c2bc3a722c6f'); - - - @@ -8922,7 +8784,7 @@ var element = document.getElementById('35bf8e3a-c090-41af-9004-c2bc3a722c6f'); @@ -8956,96 +8818,24 @@ var element = document.getElementById('35bf8e3a-c090-41af-9004-c2bc3a722c6f'); - - - - @@ -7643,7 +7633,7 @@ $$

@@ -7674,7 +7664,7 @@ $$

@@ -7686,7 +7676,7 @@ $$

@@ -7714,7 +7704,7 @@ $$

@@ -7757,6 +7747,13 @@ $$

+ - @@ -7852,7 +7842,7 @@ var element = document.getElementById('45125ed1-65fd-4354-9bb9-99178857ecb2'); @@ -7918,6 +7908,13 @@ Final error testing 28.49% + @@ -8001,8 +7999,8 @@ var element = document.getElementById('37bde5a3-2428-410f-b662-7ee2a91e2d4e'); @@ -8015,7 +8013,7 @@ Final error testing 3.58% @@ -8026,7 +8024,16 @@ Final error testing 3.58% @@ -8034,6 +8041,6 @@ Final error testing 3.58% diff --git a/docs/source/tutorials/tutorial6/tutorial.html b/docs/source/tutorials/tutorial6/tutorial.html index a75032b..b102a31 100644 --- a/docs/source/tutorials/tutorial6/tutorial.html +++ b/docs/source/tutorials/tutorial6/tutorial.html @@ -7517,7 +7517,7 @@ a.anchor-link { @@ -7742,7 +7743,7 @@ tensor([[2.1158, 2.5328], @@ -7812,7 +7813,7 @@ tensor([[2.1158, 2.5328], @@ -7923,7 +7924,7 @@ tensor([[2.1158, 2.5328], @@ -7964,7 +7965,7 @@ tensor([[2.1158, 2.5328], @@ -7991,17 +7992,6 @@ tensor([[2.1158, 2.5328], - - - - @@ -7652,7 +7640,7 @@ The dataset is composed by 500 snapshots of the velocity (along $x$, $y$, and th @@ -7664,7 +7652,7 @@ The dataset is composed by 500 snapshots of the velocity (along $x$, $y$, and th @@ -7693,28 +7681,7 @@ The dataset is composed by 500 snapshots of the velocity (along $x$, $y$, and th - - - - @@ -7804,7 +7753,7 @@ The dataset is composed by 500 snapshots of the velocity (along $x$, $y$, and th @@ -7828,9 +7777,8 @@ The dataset is composed by 500 snapshots of the velocity (along $x$, $y$, and th # fit the pod basis trainer.data_module.setup("fit") # set up the dataset -x_train = trainer.data_module.train_dataset.conditions_dict["data"][ - "target" -] # extract data for training +train_data = trainer.data_module.train_dataset.get_all_data() +x_train = train_data["data"]["target"] # extract data for training pod_nn.fit_pod(x=x_train) # now train @@ -7847,6 +7795,13 @@ The dataset is composed by 500 snapshots of the velocity (along $x$, $y$, and th + @@ -7957,8 +7907,8 @@ var element = document.getElementById('4e45c6e0-34a5-49d6-b093-e133f1ca6f8d'); @@ -7971,18 +7921,7 @@ var element = document.getElementById('4e45c6e0-34a5-49d6-b093-e133f1ca6f8d'); - - - @@ -8113,18 +8032,11 @@ var element = document.getElementById('4e45c6e0-34a5-49d6-b093-e133f1ca6f8d'); - - - - - - - - @@ -7749,10 +7725,11 @@ $u(x) \approx u_{\theta}(x)=NN_{\theta}(v(x))$.

@@ -7764,19 +7741,13 @@ would indicate a periodicity of $2$ in $x$, $3$ in $y$, and so on...