However, when I call the “Module” from other custom class, these parameters do not appear in the list.
So if I want to call the function “Module2” from some other custom class
  self.conv = Module1(input_dim, output_dim, support1, support2)
  

   class Module1(nn.Module):
       def __init__(self, input_dim, output_dim, support1, support2, iter):
           super(Module1, self).__init__()
              self.input_dim = input_dim
              self.output_dim = output_dim
              self.support1 = support1
              self.support2 = support2
              self.iter = iter
              self.build()

     def build(self):
        self.dict = {}
        for i in range(self.iter):
             self.dict["no_%s"%i] = Module2(input_dim=self.input_dim,
                                                    output_dim=self.output_dim,
                                                    support1=self.support1,
                                                    support2=self.support2,
                                                    )
class Module2(nn.Module):
    def __init__(self, self, input_dim, output_dim, support1, support2):
       super(Module2,self).__init__()
       self.build()

  def build(self):
     self.wt_dict = nn.ParameterDict()
     for i in range(3):
        self.wt_dict["weight_%s"%i] = nn.Parameter(torch.randn(output_dim, input_dim)) 
        for j in range(14):
           self.wt_dict["weight_left_%s%s"%(i,j)] = nn.Parameter(torch.randn(output_dim, 1))
           self.wt_dict["weight_right_%s%s"%(i,j)] = nn.Parameter(torch.randn(output_dim, 1))

Are there any things I need to keep in mind to have the parameters from the custom layers to be present in the model parameters when finally we call the model.??
Thanks!