Change PODLayer name (#251)

* rename PODBlock
* add tutorial rst

---------

Co-authored-by: Dario Coscia <dariocoscia@Dario-Coscia.local>
Co-authored-by: Dario Coscia <dariocoscia@Dario-Coscia.lan>
This commit is contained in:
Dario Coscia
2024-02-29 16:01:01 +01:00
committed by GitHub
parent c2529d325a
commit c92a2832d5
7 changed files with 30 additions and 30 deletions

View File

@@ -26,7 +26,7 @@ import pina
from pina.geometry import CartesianDomain
from pina.problem import ParametricProblem
from pina.model.layers import PODLayer
from pina.model.layers import PODBlock
from pina import Condition, LabelTensor, Trainer
from pina.model import FeedForward
from pina.solvers import SupervisedSolver
@@ -85,7 +85,7 @@ class SnapshotProblem(ParametricProblem):
}
# Then, we define the model we want to use: basically we have a MLP architecture that takes in input the parameter and return the *modal coefficients*, so the reduced dimension representation (the coordinates in the POD space). Such latent variable is the projected to the original space using the POD modes, which are computed and stored in the `PODLayer` object.
# Then, we define the model we want to use: basically we have a MLP architecture that takes in input the parameter and return the *modal coefficients*, so the reduced dimension representation (the coordinates in the POD space). Such latent variable is the projected to the original space using the POD modes, which are computed and stored in the `PODBlock` object.
# In[33]:
@@ -101,7 +101,7 @@ class PODNN(torch.nn.Module):
"""
super().__init__()
self.pod = PODLayer(pod_rank)
self.pod = PODBlock(pod_rank)
self.nn = FeedForward(
input_dimensions=1,
output_dimensions=pod_rank,
@@ -124,8 +124,8 @@ class PODNN(torch.nn.Module):
def fit_pod(self, x):
"""
Just call the :meth:`pina.model.layers.PODLayer.fit` method of the
:attr:`pina.model.layers.PODLayer` attribute.
Just call the :meth:`pina.model.layers.PODBlock.fit` method of the
:attr:`pina.model.layers.PODBlock` attribute.
"""
self.pod.fit(x)