Model.parameters() returning empty list

Did any one face this? i cannot proceed since the model is not showing any parameters,
I must have done something wrong… cannot trace it.

Maybe you didn’t add any module inside the model itself?.

You need to do self.layer1 = ... inside the constructor for the parameters to be available through this method.