@sparshgarg23 For an autoencoder setup, the last layer should represent the learned embedding. So you can just remove the activation layer and then make it flow to your decoder setup
Some pointers though


Generally the decoder setup is exactly same as the encoder setup


You might end up training a huge decoder since your encoder is vgg/resnet. You will have to come up with a transpose of the pretrained model and use that as the decoder, allowing only certain layers of the encoder and decoder to get updated


Following is an article that will help you come up with the model architecture
  
      

      Medium – 17 Nov 21
  

  
    

Convolutional Autoencoders for Image Noise Reduction

  In “Anomaly Detection with Autoencoders Made Easy” I mentioned that the Autoencoders have been widely applied in dimension reduction and…

  
    Reading time: 10 min read