I'm trying to implement this loss function : MCFD_loss_function from this document (P6) : Loss functions
So I created a new function like this :
def mcfd_loss(y_true, y_pred):
return K.sum( # ∑
K.cast(
K.greater( # only values greater than 0 (+ float32 cast)
K.dot(K.sign(y_pred), # π
K.sign(y_true))
, 0)
, 'float32')
)
But when I start training this error is raised :
ValueError: An operation has
None
for gradient. Please make sure that all of your ops have a gradient defined (i.e. are differentiable). Common ops without gradient: K.argmax, K.round, K.eval.
I don't know which point I missed. The error seems to be raised because I use greater function. I don't know what does this error mean and how to correct my problem.
Thanks.