pre-training method