You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,20 +90,21 @@ Do you want to learn more about it? Look at our [Tutorials](https://github.com/m
90
90
### Solve Data Driven Problems
91
91
Data driven modelling aims to learn a function that given some input data gives an output (e.g. regression, classification, ...). In PINA you can easily do this by:
92
92
```python
93
+
import torch
93
94
from pina import Trainer
94
95
from pina.model import FeedForward
95
96
from pina.solver import SupervisedSolver
96
97
from pina.problem.zoo import SupervisedProblem
97
98
98
99
input_tensor = torch.rand((10, 1))
99
-
output_tensor= input_tensor.pow(3)
100
+
target_tensor= input_tensor.pow(3)
100
101
101
102
# Step 1. Define problem
102
103
problem = SupervisedProblem(input_tensor, target_tensor)
103
104
# Step 2. Design model (you can use your favourite torch.nn.Module in here)
104
105
model = FeedForward(input_dimensions=1, output_dimensions=1, layers=[64, 64])
0 commit comments