Keras model predicts correctly, but always at 100% confidence

I’m trying to create my own model to classify a face as either
wearing a mask or not, and by what ratio. This
is my Colab notebook
, with predictions output at the end.

The question is:

How do I make the model predict with confidence, for example:
[0.966 0.034]?

Note: I didn’t use binary_crossentropy with one neuron dense
layer on purpose for this model, as I am planning on adding a 3rd
class (mask worn incorrectley) as soon as I have a better

submitted by /u/LGariv

[visit reddit]


Leave a Reply

Your email address will not be published. Required fields are marked *