# 100種物體分類(cifar100)
50,000 張 32x32 彩色訓練圖像數據,以及 10,000 張測試圖像數據,總共分為 100 個類別。
用法:
~~~
import numpy as np
import matplotlib.pyplot as plt
from AADeepLearning.datasets import cifar100
(x_train, y_train), (x_test, y_test) = cifar100.load_data(label_mode='fine')
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 = np.transpose(x_train, (0,2,3,1))
plt.figure(figsize=(1,1))
plt.imshow(x_train[0])
plt.show()
~~~
```
#輸出
x_train shape: (50000, 3, 32, 32)
y_train shape: (50000, 1)
x_test shape: (10000, 3, 32, 32)
y_test shape: (10000, 1)
```
* **返回:**
* 2 個元組:
* **x\_train, x\_test**: uint8 數組表示的 RGB 圖像數據,尺寸為 (num\_samples, 3, 32, 32) 或 (num\_samples, 32, 32, 3),基于`image_data_format`后端設定的`channels_first`或`channels_last`。
* **y\_train, y\_test**: uint8 數組表示的類別標簽(范圍在 0-9 之間的整數),尺寸為 (num\_samples,)。
- 序言
- 安裝
- 快速體驗
- 配置
- 層(layer)
- 展平(flatten)
- 全連接(fully connected)
- 卷積(convolutional)
- 池化(pooling)
- 標準化(batch normalization)
- 失活(dropout)
- 循環(RNN)
- 長短期記憶(LSTM)
- 激活函數(activation)
- relu
- sigmoid
- tanh
- 損失(loss)
- 交叉熵損失(softmax)
- 折頁損失(SVM或Hinge)
- 優化器(optimizer)
- 帶動量學習率自適應(adam)
- 動量(momentum)
- 學習率自適應(rmsprop)
- 隨機梯度下降(sgd)
- 模型(model)
- 保存(save)
- 載入(reload)
- 繼續訓練(continue train)
- 數據集(datasets)
- 手寫數字(mnist)
- 時尚物品(Fashion-MNIST)
- 10種物體分類(cifar10)
- 100種物體分類(cifar100)
- 電影評論情感分類(imdb)
- 路透社新聞主題分類(reuters)
- 可視化(visualization)
- 損失曲線(loss)
- 準確率曲線(accuracy)