Use a different class in main class

I have a class of single layer (below) of neural network (Neural_Made) going from one layer to another layer. I want to construct my whole network using this class as a building block. For that I used another class Made to build my whole network. But I am unable to figure out how to do it. Please provide a solution for the query.

class Neural_Made(nn.Linear):
    def __init__(self,n,m,exclusive):
        super(Neural_Made,self).__init__(n*m*m*m*m,n*m*m*m*m)
        self.n=n
        self.m=m
        self.exclusive=exclusive #exclusive is a boolean
        self.in_size=n*m*m*m*m
        self.register_buffer('Mask1',torch.ones([self.in_size]*2))
        if self.exclusive:
            self.Mask1=1-torch.triu(self.Mask1)
        else:
            self.Mask1=torch.tril(self.Mask1)
        nn.init.xavier_uniform_(self.weight.data)

    def forward(self,x):
        return nn.functional.linear(x,self.Mask1*self.weight,self.bias)

class Made(nn.Module):  #This is the main class which is using the above network
 def __init__(self,n,m):
    super(Made,self).__init__()
    self.n=n
    self.m=m
    Neural_Made(self.n,self.m,exclusive=True)
 def forward(self,x):

You can use your custom nn.Module just like any other layer in PyTorch. I.e. initialize it in the parent’s __init__ method and call into it in the forward method.

I don’t get it. Can you please explain it in little detail? It will be much help.

Take a look at this example to see how a custom neural network is created.
There you can see the initialization of each layer in the Net.__init__ method and how to use them in the forward.