使用神经网络训练的监督 class 化对不同 class 的概率估计

Probability Estimate for different class using supervised classification with neural network training

在教程中https://www.tensorflow.org/tutorials/keras/classification

https://www.tensorflow.org/tutorials/keras/classification#make_predictions

A prediction is an array of 10 numbers. They represent the model's "confidence" that the image corresponds to each of the 10 different articles of clothing. You can see which label has the highest confidence value:

如果我想估计每个class(不同物品的衣服)的概率,而不是置信度。我该怎么做?

正如@desertnaut 提到的评论,上面代码的信心

probability_model = tf.keras.Sequential([model, 
                                         tf.keras.layers.Softmax()])
predictions = probability_model.predict(test_images)

变量predictions给出的确实是概率