Undocumented nn.Sequential add_module behavior

Thanks ptrblck, I understand why it happens after inspecting the output and module list, I was just surprised by the behavior at first: it’s not documented that adding Module attributes to a nn.Sequential instance automatically adds the modules to the forward call.

Obvious in hindsight since the attribute is added to self._modules, but easy to miss. Hence the question: should this be documented? To add to that, is second way of initializing a Sequential recommended? Also see this thread.