@FA_mn not really an answer to your question but out of curiosity how this loss function works? I mean what is its difference from MSE and why do you use the derivatives (apologies if it is a newbie question but I am quite new to it).