Effectiveness of an Encoder

Does anyone have a possible way to evaluate the effectiveness of an encoder. That is if the Latent Space is a true representative of the images feature, and what should be optimum length of this vector.Should we treat the length of the Latent space vector as a hyper parameter. Is understanding the effectiveness of an encoder even possible and if yes, then is it relevant ? One possible way that I can think of is decoding the input from the Latent representation and getting the accuracy of that i.e how similar are are input and the decoded signal. On Second thought maybe we can use this to train the encoder ? I am basically training an Image based encoder followed by a sequential (LSTM) decoder. Is it possible to train the model as a single end to end system i.e. getting the model to back propogate even to the encoder layers.

@jeremy @sgugger please help