i am new to tensorflow. I am working with keras but for creating a customized loss function i am more or less forced to write a function in tensorflow. I get stuck at the point where i have to translate this following numpy for loop into tensorflow syntax. i am new to tensorflow. I am working with keras