Update training.R