What kind of issue are you facing?
You could do something like below:
seq = nn.Sequential(nn.Linear(5,5), nn.Dropout(0.2), nn.Linear(5,1))
x = torch.rand(5,5)
for layer in seq:
     x = layer(x)
     print(x)