You could just call these model in a sequential manner (same as in NeuralNet):
layer1 = Layer1()
layer2 = Layer2()

x = torch.randn(1, 10)
target = torch.randint(0, 2, (1,))

out = layer1(x)
out = layer2(out)

loss = criterion(out, target)
loss.backward()