Modèle PyTorch.py
import torch
import torch.nn as nn

class MyModel(nn.Module):

    def __init__(self):
        super(MyModel, self).__init__()
        self.fc1 = nn.Linear (2, 10)
        self.fc2 = nn.Linear (10, 100)
        self.relu = nn.ReLU()
        ...
        
    def forward(self, x) :
        x = self.fc1(x)
        x = self.relu(x)
        x = self.fc2(x)
        return x

Définir la passe avant du modèle