I want to implement this loss like this:

This is code:
def loss(output, target, from_logits=False):
L1 = - tf.reduce_sum(target * tf.log(output), reduction_indices=len(output.get_shape()) - 1)
L2 = tf.reduce_sumr(tf.square(tf.subtract(tf.reduce_sum(tf.multiply(j,output), reduction_indices=len(output.get_shape()) - 1), y))))
L3 = tf.reduce_sum(tf.reduce_sum(tf.multiply(output,tf.square(tf.subtract(j,tf.reduce_prod(tf.multiply(k,p<sub>i,k</sub>)))))))
loss = L1 + L2 + L3
return loss
- How about formula that I implement? Is that right?
Please hep me. Thank you very much.