def __init__():
    .....
    for i in range(0, number_of_modules):
             setattr(self,'dog' + str(i) ,nn.Linear(4096, 300))
def forward(self,input):
  	dog1 = self.dog1(input)
  	dog2 = self.dog2(input)
  	dog3 = getattr(self,'dog3')(input)

or
def __init__():
    .....
    modules = []
    for i in range(0, number_of_modules):
             modules .append( nn.Linear(4096, 300))
    self.modules = nn.ModuleList(modules)
def forward(self,input):
  	outputs = []
    for model in self.modules:
      outputs.append(model(input))

also,try to format your code like:

```Python

your code here

```