Joint Message Passing and Autoencoder for Deep Learning