how to get the next element in nn.ModuleList in an iteration? Please help
class A(nn.Module):
def __init__(self,func):
super().__init__()
self.func = nn.ModuleList(func)
def forward(self, x):
for fun in self.func:
# get the current and next func
return