Help to create such a neural network using nn.ModuleList


I don’t really understand how to write such a model using ModuleList. Please help me

The model definition does not seem to be complete. However, you can simply add the mentioned modules to the nn.ModuleList and iterate it. Something like this should work:

modules = nn.ModuleList([
    nn.Linear(..., 19),
    nn.ReLU(),
    ...
])

for module in modules:
    x = module(x)