theThe structure of auto-encoder must define the number of neuron inputs plus each hidden layer to the compressed layer and the same apply for the decoder part. In case of having different image sizer, why don't you re-size your images or apply image sliding on your inputs. youYou can find implementation on CNN which produce image captioning on image sliding.