When should I use nn.ModuleList and when should I use nn.Sequential?

The other thing is I noticed you can pass a list of class objects to nn.Sequential like this guy does here implementing DenseNet in the _make_dense function at the bottom. Why exactly does this work?

1 Like