多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
# 时尚物品(Fashion-MNIST) 训练集为 60,000 张 28x28 像素灰度图像,测试集为 10,000 同规格图像,总共 10 类时尚物品标签。该数据集可以用作 MNIST 的直接替代品。类别标签是: | 类别 | 描述 | 中文 | | --- | --- | --- | | 0 | T-shirt/top | T恤/上衣 | | 1 | Trouser | 裤子 | | 2 | Pullover | 套头衫 | | 3 | Dress | 连衣裙 | | 4 | Coat | 外套 | | 5 | Sandal | 凉鞋 | | 6 | Shirt | 衬衫 | | 7 | Sneaker | 运动鞋 | | 8 | Bag | 背包 | | 9 | Ankle boot | 短靴 | ## 用法: ~~~ from AADeepLearning.datasets import fashion_mnist import matplotlib.pyplot as plt (x_train, y_train), (x_test, y_test) = fashion_mnist.load_data() fig = plt.figure() plt.imshow(x_train[10],cmap = 'binary')#黑白显示 plt.show() print('x_train shape:', x_train.shape) print('y_train shape:', y_train.shape) print('x_test shape:', x_test.shape) print('y_test shape:', y_test.shape) ~~~ ``` #输出 x_train shape: (60000, 28, 28) y_train shape: (60000,) x_test shape: (10000, 28, 28) y_test shape: (10000,) ``` **返回:** * 2 个元组: * **x\_train, x\_test**: uint8 数组表示的灰度图像,尺寸为 (num\_samples, 28, 28)。 * **y\_train, y\_test**: uint8 数组表示的数字标签(范围在 0-9 之间的整数),尺寸为 (num\_samples,)。