Cannot assign 'torch.nn.modules.container.Sequential' as parameter

But what if I need to declare it as a parameter? Maybe I wasn’t explaining it fully here but I’m trying to assign parameter in foward function following this approach Dynamic parameter declaration in forward function

In that post, the Chief Crazy Person suggested using self.register_parameter.