Sum-product autoencoding: Encoding and decoding representations using sum-product networks