Hi @ptrblck_de, (I will message other people as well)
Would you mind helping me with this please, I would really appreciate your help, and better understand PyTorch.
I do not think that this question is too challenging or too complex.
Thank you,
Andrew
P.S. I realize I need to add a delta variable, and transfer the gradients from that variable.
So before no_grad():
delta = T.abs(y - labels)
with T.no_grad():
     loss = delta**2    
...                  

… Transfer the gradient of that variable:
loss = TransferGradient(delta, loss)

Sorry, I could not edit my original post.