Hello.
I would like to know how can I keep a reference to a nn.Parameter in a module and a submodule, as both of them use this parameter and I don’t want to pass them as argument.
For example:
class SubModule(nn.Module):
    def __init__(self,X):
            super(SubModule, self).__init__()
            self.X = X

class BigModule(nn.Module):
     def __init__(self):
           super(BigModule, self).__init__()
           self.X = nn.Parameter(torch.ones(10,10))
           self.submodules = nn.ModuleList([SubModule(self.X),SubModule2(self.X)])