added configuration for number of times to run pretrain