官术网_书友最值得收藏!

  • Keras Deep Learning Cookbook
  • Rajdeep Dua Manpreet Singh Ghotra
  • 92字
  • 2021-06-10 19:38:52

How to do it...

Let's look at the code on how to load MNIST data into numpy arrays using the keras.datasets.mnist class:

from keras.datasets import mnist
(X_train, y_train), (X_test, y_test) = mnist.load_data()
print("X_train shape: " + str(X_train.shape))
print("y_train shape: " + str(y_train.shape))
print("X_test shape: " + str(X_test.shape))
print("y_test shape: " + str(y_test.shape))

The output of the preceding list shows the following dataset shape:

X_train shape: (60000, 28, 28)
y_train shape: (60000,)
X_test shape: (10000, 28, 28)
y_test shape: (10000,)

Next, let's look at how to load data from a .csv file.

主站蜘蛛池模板: 卓尼县| 连云港市| 正阳县| 阳信县| 科技| 民权县| 林芝县| 积石山| 浦江县| 普定县| 班玛县| 五原县| 闻喜县| 民乐县| 康保县| 永嘉县| 池州市| 内乡县| 太和县| 大石桥市| 凌海市| 深水埗区| 镇原县| 镇原县| 绵竹市| 都昌县| 原阳县| 扬州市| 兰考县| 呼伦贝尔市| 呼伦贝尔市| 灵丘县| 龙川县| 土默特左旗| 西宁市| 固镇县| 绿春县| 古交市| 宜黄县| 宜宾市| 镇宁|