ERROR:optimizer got an empty parameter list

This happens because model.parameters() is empty.
It might probably happen because all your parameters are inside a list which is attributed to the model, and pytorch can’t find them. Something like

self.myparameters = [Parameter1, Parameter2, ...]

If that is the case, then you should use nn.ParameterList instead.

self.myparameters = nn.ParameterList(Parameter1, Parameter2, ...)
13 Likes