allow setting Trainer parameters in constructor