In the __init__() of a module class, I want to pack and register some conv layers like this:
self.outs = nn.ModuleList(
            [nn.ModuleList([Conv(inp_dim + j * increase, oup_dim, 1, relu=False, bn=False) for j in range(5)]) for i in
             range(nstack)])

then in the forward() method, I want to use the conv layers in the nested module list.
preds_instack.append(self.outs[i][j](features_instack[j]))
Am I right? I’m debugging my module which claimed:

RuntimeError: Trying to backward through the graph a second time, but the buffers have already been freed. Specify retain_graph=True when calling backward the first time.

Now I am trying to locate the error.