Dear @ptrblck and @Jaideep_Valani,
Exactly, I just wanted to comment myself!
I guess, the mistake lays in the forward function, as you mentioned.
The key here is to pass self.enc.extract_features(x) in the forward function.
Thank you a lot for your response!