Keras : Datasets(翻訳/要約)
* 本ページは、Keras 本家サイトの Keras : Datasets の簡単な要約です。
CIFAR10 小画像分類
keras.datasets.cifar10
10 カテゴリーにラベルづけられた、50,000 32×32 カラー訓練画像のデータセット、
そして 10,000 テスト画像。
使用方法:
(X_train, y_train), (X_test, y_test) = cifar10.load_data()
戻り値:
- 2 タブル:
- X_train, X_test: shape (nb_samples, 3, 32, 32) の RGB 画像データの uint8 配列。
- y_train, y_test: shape (nb_samples,) のカテゴリー・ラベル(range 0-9 の整数値)の uint8 配列。
CIFAR100 小画像分類
keras.datasets.cifar100
100 カテゴリーにラベルづけられた、50,000 32×32 カラー訓練画像のデータセット、
そして 10,000 テスト画像。
使用方法:
(X_train, y_train), (X_test, y_test) = cifar100.load_data(label_mode=’fine’)
戻り値:
- 2 タブル:
- X_train, X_test: shape (nb_samples, 3, 32, 32) の RGB 画像データの uint8 配列。
- y_train, y_test: shape (nb_samples,) のカテゴリー・ラベルの uint8 配列。
引数:
- label_mode: “fine” または “coarse”.
MNIST 手書き数字のデータセット
keras.datasets.mnist
10 数字の 60,000 28×28 グレースケール画像のデータセット、10,000 画像のテストセット添付。
使用方法:
(X_train, y_train), (X_test, y_test) = mnist.load_data()
戻り値:
- 2 タブル:
- X_train, X_test: shape (nb_samples, 28, 28) のグレースケール画像データの uint8 配列。
- y_train, y_test: shape (nb_samples,) の数字ラベル(range 0-9 の整数値)の uint8 配列。
引数:
- path: if you do have the index file locally (at ‘~/.keras/datasets/’ + path),
if will be downloaded to this location (in cPickle format).
以上