Keras loss constant

时间:2018-07-25 04:54:41

标签: keras loss-function

def myloss(y_true, y_pred):
        b = k.constant([1, 1, 1, 50, 50, 50], shape=[6, 1])
        return (k.mean(k.sqrt(k.dot(k.square(y_pred - y_true), b)))

This is our loss function and we got this result.

2800/2799 [==============================] - 245s - loss: 204.2003 - soft_acc: 0.5136 - val_loss: 64.3844 - val_soft_acc: 0.4648

We tried changing the learning rates and optimiser but the loss didn't improve

we refered to this link Keras Extremely High Loss

epoch 1/200 ===========================] - 254s - loss: 4.0631 - rmse: 5.1670 - val_loss: 4.6882 - val_rmse: 4.7807

and added logarithmic error and got the above loss value. How to reduce the loss further?

1 个答案:

答案 0 :(得分:0)

我尝试规范化数据。它对我有用。