To prevent overfitting and under estimating the generalisation error during training, use a training/test set paradigm.