Ho I see,
I think you want both your __res_block and __res_base functions to return an instance of Modules.
Otherwise their parameters won’t be recognized as being part of the main network.
You want both of them to be classes that subclass the nn.Module class.
In each, you want in the init to initialize the operations and store them in self as done here 32 then a forward pass that just use them as done here 16.