How Can I split a Sequential Model

Say I have a sequential model as follows.

model = nn.Sequential(
    nn.Linear(16, 12),
    nn.ReLU(),
    nn.Linear(12, 10),
    nn.ReLU(),
    nn.Linear(10, 1),
    nn.Sigmoid()
)

How can I split it into two different models, with model containing a couple of layers?

You can just use slicing these days: e.g. model[:4] and model[4:] is a split after the second ReLU.

Best regards

Thomas