I can’t see anything obviously wrong with the model, are you sure the test data doesn’t have NaNs inside?
Also, it might be easier for you to use nn.ModuleList instead of adding the modules and maintaining a list separately.