Usage of register_parameter

When I look through the codes, noticed that the main usage of model.register_parameter(name, param) is assigning None to the parameters. I have the following toy example:

class MyModel(nn.Module):
    def __init__(self):
        self.register_parameter('t', None)
    def forward(self, x):

my_model = MyModel()

I thought that when I call list(my_model.named_parameters()), I will see my parameter named t. But the result is empty list. So 2 questions came to my mind:

  1. Instead of register_parameter(...), what about just using self.t = None.
    PS: Ignoring that some sanity checks register_parameter(...) is using. pytorch/ at 7aa605ed92dbb726a2f285246369b0a17972ba12 · pytorch/pytorch · GitHub

  2. What about about using self.t = nn.Parameter(None). In this case, even list(my_model.named_parameters()) is not empty

What is wrong with these approaches?