Help protect the Great Barrier Reef with TensorFlow on Kaggle

tf.keras.metrics.sparse_categorical_accuracy

Calculates how often predictions match integer labels.

Standalone usage:

````y_true = [2, 1]`
`y_pred = [[0.1, 0.9, 0.8], [0.05, 0.95, 0]]`
`m = tf.keras.metrics.sparse_categorical_accuracy(y_true, y_pred)`
`assert m.shape == (2,)`
`m.numpy()`
`array([0., 1.], dtype=float32)`
```

You can provide logits of classes as `y_pred`, since argmax of logits and probabilities are same.

`y_true` Integer ground truth values.
`y_pred` The prediction values.

Sparse categorical accuracy values.

[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }]
[{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]