In that example, they wrapped the orderdict using nn.Sequential to make a single layer. In my case, I want to store a certain number of layers in a dictionary and later I want to use them based on conditions.