changed target from 0 (for wrong class) to -1 for wrong class. This works better for hyperbolic tangent output