Michael_Lellouch:

self.hidden_layers = [torch.nn.Linear(input_size, 256] + [
            torch.nn.Linear(256, 256) for i in range(7)
        ]



These will not show up in your list(model.names_parameters()) and thus not be trained. Use a torch.nn.ModuleList to fix that, or, at your style preference, add the ReLUs there and make it a torch.nn.Sequential model…
Best regards
Thomas