Difference between nn.Container and nn.Module?

Recently when I start to construct network module , I got confused that some people inherit from nn.Container while others choose nn.Module.

I just wonder What is the difference between that ?
I look through the source code and just find that nn.Container is a sub class of nn.Module ??

Could someone make clear of the question ?

3 Likes

nn.Container is something old, and is irrelevant. It does not exist anymore and has been merged into nn.Module.

2 Likes