加載 Fashion-MNIST 數據集。
用法
tf.keras.datasets.fashion_mnist.load_data()
返回
-
NumPy 數組元組:
(x_train, y_train), (x_test, y_test)
。
這是一個包含 10 個時尚類別的 60,000 個 28x28 灰度圖像的數據集,以及一個包含 10,000 個圖像的測試集。該數據集可用作 MNIST 的 drop-in 替代品。
這些課程是:
標簽 | 說明 |
---|---|
0 | T-shirt/頂部 |
1 | Trouser |
2 | Pullover |
3 | Dress |
4 | Coat |
5 | Sandal |
6 | Shirt |
7 | Sneaker |
8 | Bag |
9 | 踝靴 |
x_train:uint8 具有形狀的灰度圖像數據的 NumPy 數組(60000, 28, 28)
,包含訓練數據。
y_train:uint8 NumPy 形狀的標簽數組(0-9 範圍內的整數)(60000,)
對於訓練數據。
x_test:uint8 NumPy 灰度圖像數據數組,形狀為 (10000, 28, 28),包含測試數據。
y_test:uint8 NumPy 形狀的標簽數組(0-9 範圍內的整數)(10000,)
為測試數據。
例子:
(x_train, y_train), (x_test, y_test) = fashion_mnist.load_data()
assert x_train.shape == (60000, 28, 28)
assert x_test.shape == (10000, 28, 28)
assert y_train.shape == (60000,)
assert y_test.shape == (10000,)
執照:
Fashion-MNIST 的版權歸 Zalando SE 所有。 Fashion-MNIST 在 MIT 許可下獲得許可。
相關用法
- Python tf.keras.datasets.cifar10.load_data用法及代碼示例
- Python tf.keras.datasets.mnist.load_data用法及代碼示例
- Python tf.keras.datasets.imdb.get_word_index用法及代碼示例
- Python tf.keras.datasets.cifar100.load_data用法及代碼示例
- Python tf.keras.applications.inception_resnet_v2.preprocess_input用法及代碼示例
- Python tf.keras.metrics.Mean.merge_state用法及代碼示例
- Python tf.keras.layers.InputLayer用法及代碼示例
- Python tf.keras.callbacks.ReduceLROnPlateau用法及代碼示例
- Python tf.keras.layers.serialize用法及代碼示例
- Python tf.keras.metrics.Hinge用法及代碼示例
- Python tf.keras.experimental.WideDeepModel.compute_loss用法及代碼示例
- Python tf.keras.metrics.SparseCategoricalAccuracy.merge_state用法及代碼示例
- Python tf.keras.metrics.RootMeanSquaredError用法及代碼示例
- Python tf.keras.applications.resnet50.preprocess_input用法及代碼示例
- Python tf.keras.metrics.SparseCategoricalCrossentropy.merge_state用法及代碼示例
- Python tf.keras.metrics.sparse_categorical_accuracy用法及代碼示例
- Python tf.keras.layers.Dropout用法及代碼示例
- Python tf.keras.activations.softplus用法及代碼示例
- Python tf.keras.utils.custom_object_scope用法及代碼示例
- Python tf.keras.optimizers.Optimizer.set_weights用法及代碼示例
注:本文由純淨天空篩選整理自tensorflow.org大神的英文原創作品 tf.keras.datasets.fashion_mnist.load_data。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。