added optional cg trainer to MDNTrainer