How can I get Features extracted by encoder

Would you like to save the features learned by the encoder?
Depending on the model, you could return the latent vectors with the final output and just concatenate them into a tensor, and save them using torch.save.