Building the training model