I get the following error if I put the sentence before the forward:
ValueError: optimizer got an empty parameter list.
And it’s happening to me because I define the net in the forward, because the parameters of the first layers are defined at that time, what do you recommend?