The point is not that they have to be registered during __init__ but before you create the optimizer since references to the parameters are given to. The optimizer.
For example you could have a function build_model which creates the layers etc. and as long as you call it before creating the optimizers, you should be fine.

Note: when using functional functions like conv2d, you also should register weights and bias as torch.nn.Parameter 5