I have created a class that has nn.Module as subclass.
In my class, I have to create N number of linear transformation, where N is given as class parameters.
You can use nn.ModuleList to wrap your list of linear layers as explained here
nn.ModuleList
self.list_1 = nn.ModuleList(self.list_1)