I want to use the pre trained weights first to encode that image and then decode the latent representation of that image?