You should use a nn.ModuleList instead of a python list. Looking at this topic might be useful: When should I use nn.ModuleList and when should I use nn.Sequential?
3 Likes
You should use a nn.ModuleList instead of a python list. Looking at this topic might be useful: When should I use nn.ModuleList and when should I use nn.Sequential?