Made error calculation in trainer fractional for better training.