I did some experiments on convolutional autoencoder by increasing the size of latent variables from 64 to 128. I used 4 covolutional layers for the encoder and 4 transposed convolutional layers as the decoder. When I increase the size of latent variables from 64 to 128, the autoencoder will give result in good reconstructed images. However, when I tried to use the features from the latent variables for classification task, it turns out increasing the size of the latent variables will decrease the performance of classification task. On the other hand, I also built autoencoder using resnet-34 (34 layers depth). It turns out deeper layer gives something what I want, for example increasing the size of latent variables from 64 to 128 will increase the quality of the reconstructed images as well as increase the classification task.
My question is: How can the features of latent variables from resnet-34 give better performance to the reconstructed images and classification task? and How can also the features of latent variables from 4 layers convolutional autoencoder will give bad result for the classification task but good result for the reconstructed images?