Unfortunately I don’t have any context to be able to help more. As previously explained, nn.ModuleList doesn’t have this attribute and I don’t know how you are using this object or why the modules attribute is accessed.