一:pyplot.subplot绘制MNIST手写数字多个子图
from keras.datasets import mnist
from matplotlib import pyplot
# load data
(X_train, y_train), (X_test, y_test) = mnist.load_data()
# create a grid of 3x3 images
for i in range(0, 9):
pyplot.subplot(330 + 1 + i)
pyplot.imshow(X_train

该博客展示了如何使用pyplot.subplot绘制MNIST手写数字数据集的多个子图,创建3x3和3x4的图像网格。同时,通过keras.preprocessing.image.ImageDataGenerator实现数据增强,演示了如何随机旋转图像90°以增强训练数据集。
最低0.47元/天 解锁文章
1304

被折叠的 条评论
为什么被折叠?



