If the plotting limits are removed, the same plot looks like this:
I suspect the code was written when 'softmax' was used as a final layer in the model. Now that has been removed and replaced by 'from_logits=True', the predictions would be need some processing to make them 0-1.
I think there is an argument here for using 'softmax' instead of from_logits
The plotting functions appear to expect predicted values between 0-1.
e.g.
Multiplying by 100 to get a percentage for the axis label
plt.xlabel("{} {:2.0f}% ({})".format(class_names[predicted_label], 100*np.max(predictions_array), class_names[true_label]), color=color)
and
plt.ylim([0, 1])
inThis gives plots like this:
If the plotting limits are removed, the same plot looks like this:
I suspect the code was written when 'softmax' was used as a final layer in the model. Now that has been removed and replaced by 'from_logits=True', the predictions would be need some processing to make them 0-1.
I think there is an argument here for using 'softmax' instead of from_logits