I am trying to define a loss function in Keras
def rmseApprox(y_true, y_pred):
dum = y_pred
dum[y_pred>=0]=1.1
dum[y_pred<0]=1
return k.abs(K.mean(y_true - dum*y_pred), axis=-1)
which increase the positive values by a factor of 1.1 and the compare it with the true values. I got the following error:
TypeError: 'Tensor' object does not support item assignment