Encoder/Decoder Neural Network Training Algorithm