I was working with Tensorflow’s MNIST Image Classification project link: (基本分类：对服装图像进行分类 | TensorFlow Core), and during verify predictions phase, this code stated that plot_value_array was not defined even though I followed everything according to the tutorial that can be accessed, tried to work with the problem but I had no success finding a solution
i = 0
plot_image(i, predictions[i], test_labels, test_images)
plot_value_array(i, predictions[i], test_labels)
If you use Colab the most likely issue would be that you need to re-run the cell that defines the function
Hi @Ata_Tekeli, I have executed the code in the colab but i did not face error. Could you please share the error you are facing. Thank You.
It says plot_value_array is not defined
Hi @Ata_Tekeli, There is a function defined for plot_value_array
def plot_value_array(i, predictions_array, true_label):
true_label = true_label[i]
thisplot = plt.bar(range(10), predictions_array, color="#777777")
predicted_label = np.argmax(predictions_array)
You have to execute this function before your code. Thank You.