albanD:

Be careful here that for the l1 loss, the gradient can be 1 or -1 depending on the sign of the difference! That will make sure you don’t keep going in one direction forever.


Okay. Now its clear. Thanks a lot for continue reply.