# Output of classifier.predict Tensorflow extract probabiltity

When I do a prediction with my DNN clasifier I get a dictionary like this.

{'probabilities': array([9.9912649e-01, 8.7345875e-04, 8.5633601e-12], dtype=float32), 'logits': array([ 12.641698,   5.599522, -12.840958], dtype=float32), 'classes': array(['0'], dtype=object), 'class_ids': array([0])}


Can someone explain me the values of probability and logits? Why the three values ?

The docs just states

Evaluated values of predictions tensors.

And do not refer (the docs) to a struct/explanation of the output

Thanks!

• This is a softmax prediction. The classifier assigns the sample with probabilities for being in each class, rather than strictly stating this sample belongs to a particular class. If you take the argmax of each prediction, you can get the most probable class that your classifier predicted, for each sample. – Ugur MULUK Jan 3 '19 at 14:10
• @UgurMULUK The "softmax predition" you stated just opened me new horizons. Thanks for the comment ! – ItsYou Jan 3 '19 at 19:42

results = classifier.predict(input_fn = lambda: mem_input_fn())