Cleanup after training.