What causes high top_k_categorical_accuracy but low categorical_accuracy in Keras

681 views Asked by At

I'm training a model using Conv2D and started to suddenly get a high top k categorical accuracy that is 1.0 but very low categorical accuracy (close to 0.006).

I have 108 different categories so the only thing I can think of that would cause it is that it somehow get's stuck on a single category this even though the dataset is extremely balanced.

So my question is very general: What can cause high top_k_categorical_accuracy but low categorical_accuracy in Keras?

1

There are 1 answers

0
Daniel O On

The reason was that the x-values where not normalised. As soon as I normalised them the top_k_categorical_accuracy became very low as expected.