As the error states, nn.ModuleList doesn’t have the .module attribute, which is an attribute of a data parallel wrapper. I’m not sure what your code tries to do so could you explain your use case a bit more?