added class variables for training_encoder and training_decoder