How do you compute accuracy in a regression model, after rounding predictions to classes, in keras?
I use rounded accuracy like this:
def soft_acc(y_true, y_pred):
return K.mean(K.equal(K.round(y_true), K.round(y_pred)))
model.compile(..., metrics=[soft_acc])