TensorFlow -图像分类
This code imports the necessary libraries for TensorFlow and Keras, loads the Fashion MNIST dataset, and creates a neural network model to classify clothing images. The model, consisting of a Flatten layer and two Dense layers, is compiled and trained for five epochs. It evaluates test images and prints predictions. Additionally, it visualizes the results, showing images with their predicted labels, correct predictions in blue and incorrect in red. Finally, it demonstrates predicting a single image.