Пример #1
0
def sparse_categorical_accuracy(y_true, y_pred):
  return K.cast(
      K.equal(
          K.max(y_true, axis=-1), K.cast(K.argmax(y_pred, axis=-1),
                                         K.floatx())), K.floatx())
Пример #2
0
def sparse_categorical_accuracy(y_true, y_pred):
    return K.cast(
        K.equal(K.max(y_true, axis=-1),
                K.cast(K.argmax(y_pred, axis=-1), K.floatx())), K.floatx())
Пример #3
0
def binary_accuracy(y_true, y_pred):
  return K.mean(K.equal(y_true, K.round(y_pred)), axis=-1)
Пример #4
0
def binary_accuracy(y_true, y_pred):
    return K.mean(K.equal(y_true, K.round(y_pred)), axis=-1)