>>> import torch
>>> import torch.nn as nn
>>> s = nn.Sequential()
>>> s.add_module("conv", nn.Conv2d(1, 1, 4))
>>> s.conv
Conv2d(1, 1, kernel_size=(4, 4), stride=(1, 1))
>>>

You can do this. Also, you should not be looping inside your custom forward() method. The Sequential class will take care of passing outputs to inputs of the subsequent layers. Just return the result of self.net(x)