DNNLayerTrainer small refactoring