Hi,
I encounter a problem when writing forward function.
def forward(self, x):
    x = self.l1(x)
    x = self.l2(x)
    .......
    return x

To avoid hard coding, I prefer a loop like
 for i in range(10):
     x = self.locals()[ 'l' + str(i) ]

But this doesn’t work since l1, l2 appear as the name of attribute. Any suggestion will be much appreciated.