@albanD Thanks a lot for your insight.
1- What will happen to the following function ,
def f1(tensor1,tensor2):
H=tensor1-tensor2
NUM=((tensor1).data.cpu().numpy()-(tensor2).data.cpu().numpy())**2 # some operation in numpy   domain
return H-NUM
L=f1
L.backward()
here Loss is affected by “num” everytime differently depending on tensor1 and tensor2.
2- if f2=NUM , f1=H
and L=f1+f2
is L in step 2 and L in step 1 same in term of training
3- My training is getting positively affected by my original posted question. What can be the reason for that.
Thanks.