add training error to demo