These layers would reuse the “base” of the model as a potential feature extractor and would then act as two different heads giving a different set of outputs. While one head would create the reconstruction of the input image, the other one would output the classification logits. Training both heads and thus the base together using the accumulated losses could yield better results, but of course you would have to run experiments to see if that’s indeed the case.