You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

606 rivejä
69 KiB

{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"import tensorflow as tf\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
"mnist = tf.keras.datasets.mnist\n",
"(x_train, y_train),(x_test, y_test) = mnist.load_data(path=\"/data/data/mnist.npz\") #加载mnist数据集\n",
"\n",
"#验证mnist数据集大小。x为数据,y为标签。mnist每张图的像素为28*28\n",
"print(x_train.shape)\n",
"print(y_train.shape)\n",
"print(x_test.shape)\n",
"print(y_test.shape)\n",
"\n",
"#打印训练集中前9张,看看是什么数字\n",
"for i in range(9): \n",
" plt.subplot(3,3,1+i)\n",
" plt.imshow(x_train[i], cmap='gray')\n",
"plt.show()\n",
"\n",
"#打印相应的标签\n",
"print(y_train[:9])\n",
"\n",
"#基操:将像素标准化一下\n",
"x_train, x_test = x_train / 255.0, x_test / 255.0\n",
"\n",
"#搭建一个两层神经网络\n",
"model = tf.keras.models.Sequential([\n",
" tf.keras.layers.Flatten(input_shape=(28, 28)), #拉伸图像成一维向量\n",
" tf.keras.layers.Dense(128, activation='relu'), #第一层全连接+ReLU激活\n",
" tf.keras.layers.Dropout(0.2), #dropout层\n",
" tf.keras.layers.Dense(10, activation='softmax') #第二层全连接+softmax激活,输出预测标签\n",
"])\n",
"\n",
"#设置训练超参,优化器为sgd,损失函数为交叉熵,训练衡量指标为accuracy\n",
"model.compile(optimizer='sgd', loss='sparse_categorical_crossentropy', metrics=['accuracy'])\n",
"\n",
"#开始训练,训练5个epoch,一个epoch代表所有图像计算一遍。每一个epoch能观察到训练精度的提升\n",
"model.fit(x_train, y_train, epochs=6)\n",
"\n",
"#计算训练了5个epoch的模型在测试集上的表现\n",
"model.evaluate(x_test, y_test)\n",
"\n",
"\n",
"#直观看一下模型预测结果,打印测试集中的前9张图像\n",
"for i in range(9): \n",
" plt.subplot(3,3,1+i)\n",
" plt.imshow(x_test[i], cmap='gray')\n",
"plt.show()\n",
"\n",
"#打印模型识别的数字,是否正确?\n",
"np.argmax(model(x_test[:9]).numpy(), axis=1)\n",
"\n",
"#保存训练好的模型\n",
"model.save(\"/data/output/model_epoch_6\")\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"model.evaluate(x_test, y_test)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"10000/10000 [==============================] - 0s 30us/sample - loss: 0.4680 - accuracy: 0.8846\n"
]
},
{
"data": {
"text/plain": [
"[0.46795412821769716, 0.8846]"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"model.evaluate(x_test, y_test)"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"ename": "NameError",
"evalue": "name 'model' is not defined",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-1-e80b0bf1617b>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mmodel\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mevaluate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx_test\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0my_test\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;31mNameError\u001b[0m: name 'model' is not defined"
]
}
],
"source": [
"model.evaluate(x_test, y_test)"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/opt/conda/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.\n",
" from ._conv import register_converters as _register_converters\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"(60000, 28, 28)\n",
"(60000,)\n",
"(10000, 28, 28)\n",
"(10000,)\n"
]
},
{
"data": {
"text/plain": [
"<Figure size 640x480 with 9 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"[5 0 4 1 9 2 1 3 1]\n",
"Epoch 1/6\n",
"60000/60000 [==============================] - 3s 58us/sample - loss: 1.6360 - accuracy: 0.5506\n",
"Epoch 2/6\n",
"60000/60000 [==============================] - 3s 55us/sample - loss: 0.9633 - accuracy: 0.7638\n",
"Epoch 3/6\n",
"60000/60000 [==============================] - 3s 55us/sample - loss: 0.7347 - accuracy: 0.8098\n",
"Epoch 4/6\n",
"60000/60000 [==============================] - 3s 55us/sample - loss: 0.6252 - accuracy: 0.8334\n",
"Epoch 5/6\n",
"60000/60000 [==============================] - 3s 55us/sample - loss: 0.5630 - accuracy: 0.8467\n",
"Epoch 6/6\n",
"60000/60000 [==============================] - 3s 55us/sample - loss: 0.5185 - accuracy: 0.8568\n",
"10000/10000 [==============================] - 0s 37us/sample - loss: 0.4304 - accuracy: 0.8923\n"
]
},
{
"data": {
"text/plain": [
"<Figure size 640x480 with 9 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import os\n",
"import tensorflow as tf\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
"mnist = tf.keras.datasets.mnist\n",
"(x_train, y_train),(x_test, y_test) = mnist.load_data(path=\"/data/data/mnist.npz\") #加载mnist数据集\n",
"\n",
"#验证mnist数据集大小。x为数据,y为标签。mnist每张图的像素为28*28\n",
"print(x_train.shape)\n",
"print(y_train.shape)\n",
"print(x_test.shape)\n",
"print(y_test.shape)\n",
"\n",
"#打印训练集中前9张,看看是什么数字\n",
"for i in range(9): \n",
" plt.subplot(3,3,1+i)\n",
" plt.imshow(x_train[i], cmap='gray')\n",
"plt.show()\n",
"\n",
"#打印相应的标签\n",
"print(y_train[:9])\n",
"\n",
"#基操:将像素标准化一下\n",
"x_train, x_test = x_train / 255.0, x_test / 255.0\n",
"\n",
"#搭建一个两层神经网络\n",
"model = tf.keras.models.Sequential([\n",
" tf.keras.layers.Flatten(input_shape=(28, 28)), #拉伸图像成一维向量\n",
" tf.keras.layers.Dense(128, activation='relu'), #第一层全连接+ReLU激活\n",
" tf.keras.layers.Dropout(0.2), #dropout层\n",
" tf.keras.layers.Dense(10, activation='softmax') #第二层全连接+softmax激活,输出预测标签\n",
"])\n",
"\n",
"#设置训练超参,优化器为sgd,损失函数为交叉熵,训练衡量指标为accuracy\n",
"model.compile(optimizer='sgd', loss='sparse_categorical_crossentropy', metrics=['accuracy'])\n",
"\n",
"#开始训练,训练5个epoch,一个epoch代表所有图像计算一遍。每一个epoch能观察到训练精度的提升\n",
"model.fit(x_train, y_train, epochs=6)\n",
"\n",
"#计算训练了5个epoch的模型在测试集上的表现\n",
"model.evaluate(x_test, y_test)\n",
"\n",
"\n",
"#直观看一下模型预测结果,打印测试集中的前9张图像\n",
"for i in range(9): \n",
" plt.subplot(3,3,1+i)\n",
" plt.imshow(x_test[i], cmap='gray')\n",
"plt.show()\n",
"\n",
"#打印模型识别的数字,是否正确?\n",
"np.argmax(model(x_test[:9]).numpy(), axis=1)\n",
"\n",
"#保存训练好的模型\n",
"model.save(\"/data/output/model_epoch_6\")\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"10000/10000 [==============================] - 0s 30us/sample - loss: 0.4304 - accuracy: 0.8923\n"
]
},
{
"data": {
"text/plain": [
"[0.43036172440052034, 0.8923]"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"model.evaluate(x_test, y_test)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(60000, 28, 28)\n",
"(60000,)\n",
"(10000, 28, 28)\n",
"(10000,)\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAVEAAAD8CAYAAADOg5fGAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3XmQFPX5x/H3IyqigIIHIh7gFUDFW9FQSCJ44IFHRAmoGCOWN5YaieZnNF6oiRW8RUVQqaAJCmgkSBQlngENKeVQ0AhuRFFRQVQI8v39sfPt6YFddmZ7pnu69/Oqoranu2f7YZ7d3qe7v4c55xARkcbZIOkARETSTCdREZEIdBIVEYlAJ1ERkQh0EhURiUAnURGRCHQSFRGJINJJ1MyOMrN3zWyBmQ0rV1CSLOU1u5Tb8rPGNrY3s2bAe0AfoAaYAQxwzs0pX3gSN+U1u5TbytgwwnsPAhY45z4AMLNxQD+g3oSYWVPvHvW5c27rpINogPJaujTkFUrMrfJaXF6jXM53AD4Kva7JrZP6LUw6gCIor6VLQ15BuS1VUXmNUolaHevW+ctlZkOAIRGOI/FSXrOrwdwqr6WLchKtAXYIvd4e+HjtnZxzI4GRoMuDlFBes6vB3CqvpYtyOT8D2M3MOpnZxsBpwKTyhCUJUl6zS7mtgEZXos651WZ2ITAFaAaMcs7NLltkkgjlNbuU28podBOnRh1MlwdvOucOSDqIclNeldeMKiqv6rEkIhKBTqIiIhFEeTovUlX233//YPnCCy8E4IwzzgDgkUceAeDOO+8M9nnrrbdijE6ySpWoiEgEmX2w1KxZs2B58803r3c/X7FsuummAPzoRz8C4IILLgj2+f3vfw/AgAEDAPj++++DbcOHDwfguuuuKyYsPYCogH322QeAF154IVjXunXrOvf9+uuvg+Utt9yyXCEor1Xk8MMPB2Ds2LEAHHbYY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mHAleUPr3SbbropADvuuGO9+xx44IHB8rx584Am+SBqNFWc13vvvReACRMmFKz/3//yc6cV85ChdevWQH7cBN8sKswfY+bMmY0LtvqMpopzWyzfZG2TTTZJOJL1a7ASdc5NB5autbofMCa3PAY4ocxxSYUpr9ml3MarsQ+W2jnnFgM45xab2TZljCmSjz+unXdr9OjRwbprr722YJ/w66+++gqAu+66q9KhpUHV5HX16tUAfPTRR5G+z5FHHglAmzb1X73W1NQAsHLlykjHqnJVk9tSHXBAfnD511+vvklIK/50Pjdl8pBKH0fipbxmk/JausaeRD81s/a5v2jtgSX17eicGwmMhHjnbLn++uuD5bUrUalX1ee1WH5kpnPOOQeAFi1a1LvvNddcE0tMCSsqt0nl1V95AHz99ddAvivoLrvsElcYjdLYJk6TgDNzy2cCE8sTjiRMec0u5bZCGqxEzexPQC9gKzOrAX4LDAeeMLOzgUXAKZUMMqr1NcZuqrKQV2/gwIEADBs2LFi36667AoXjVK5t1qxZQOET/yxIY279swmAf/zjH0DhDBTVrMGTqHNuQD2bDi9zLBIj5TW7lNt4qceSiEgEmes7X5fGjjcpyfHTvJx++ukA9O7du959e/ToAaw/v3580PAl/7PPPgvAd999FylWadpUiYqIRNAkKlFJhz333DNYnjRpErD+7rul8A8rRo4cWZbvJ/HZcsstkw5hvVSJiohEoEpUqpIfS7KYMSWLacLmm8scffTRwbrJkydHCVFiUu1zpKkSFRGJQCdREZEImsTl/Pou93r27AloFKdq4Mf8BOjVqxcAgwYNAmDKlCkAfP/990V9r7PPPhuAiy66qIwRShz8lMlp6bGkSlREJAKLswF6UqP9/PDDD8D6G2N369YNgDlz5lQylDedcwc0vFu6VOMoTn4EoC+++KJg/XHHHRcsl/HBkvJaRieffDIAf/7zn4HCzhBdu3YFYpuJoqi8qhIVEYmgSdwTve+++wA499xz691nyJDacWiHDh0aS0xSWX5Ee0mf8NiiUNjMrXnz5nGH0yBVoiIiERQznugO1M4auC2wBhjpnBthZm2Bx4GOwIdAf+fcl5ULtfH8jJ6SV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DYvruKUysx3MbJqZzTWz2WZ2SW59WzObambzc1/bJB1rtUhDbpXX0imvRcYQx+W8mTUD3gP6ADXADGCAc25OxQ9eotyc3O2dc2+ZWSvgTeAEYDCw1Dk3PPcD1cY5d2WCoVaFtORWeS2N8lq8uCrRg4AFzrkPnHOrgHFAv5iOXRLn3GLn3Fu55eXAXKADtfGOye02htpESUpyq7yWTHktUlwn0Q7AR6HXNbl1Vc3MOgL7Am8A7Zxzi6E2ccA2yUVWVVKXW+W1KMprkeI6idY1D3ZVNwsws5bAeGCoc25Z0vFUsVTlVnktmvJapLhOojXADqHX2wMfx3TskpnZRtQmZKxz7snc6k9z91/8fZglScVXZVKTW+W1JMprkeI6ic4AdjOzTma2MXAaMCmmY5fEzAx4CJjrnLs9tGkS4CdIPxOYuPZ7m6hU5FZ5LZnyWmwMcTW2N7O+wB+BZsAo59yNsRy4RGbWA/gH8DawJrf6KmrvszwB7AgsAk5xzi1NJMgqk4bcKq+lU16LjEE9lkREGk89lkREItBJVEQkAp1ERUQi0ElURCQCnURFRCLQSVREJAKdREVEItBJVEQkgv8HsBGYJWmelc0AAAAASUVORK5CYII=\n",
"text/plain": [
"<Figure size 432x288 with 9 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"[5 0 4 1 9 2 1 3 1]\n",
"Epoch 1/9\n",
"60000/60000 [==============================] - 3s 57us/sample - loss: 1.7841 - accuracy: 0.4954\n",
"Epoch 2/9\n",
"60000/60000 [==============================] - 3s 55us/sample - loss: 1.0707 - accuracy: 0.7433\n",
"Epoch 3/9\n",
"60000/60000 [==============================] - 3s 55us/sample - loss: 0.7987 - accuracy: 0.7936\n",
"Epoch 4/9\n",
"60000/60000 [==============================] - 3s 56us/sample - loss: 0.6696 - accuracy: 0.8208\n",
"Epoch 5/9\n",
"60000/60000 [==============================] - 3s 55us/sample - loss: 0.5945 - accuracy: 0.8386\n",
"Epoch 6/9\n",
"60000/60000 [==============================] - 3s 55us/sample - loss: 0.5450 - accuracy: 0.8495\n",
"Epoch 7/9\n",
"60000/60000 [==============================] - 3s 55us/sample - loss: 0.5106 - accuracy: 0.8577\n",
"Epoch 8/9\n",
"60000/60000 [==============================] - 3s 55us/sample - loss: 0.4841 - accuracy: 0.8640\n",
"Epoch 9/9\n",
"60000/60000 [==============================] - 3s 55us/sample - loss: 0.4627 - accuracy: 0.8687\n",
"10000/10000 [==============================] - 0s 38us/sample - loss: 0.3818 - accuracy: 0.9001\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAVEAAAD8CAYAAADOg5fGAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xe0FPX9//HnW8SKXwMKiICCYEMsgAWJvYEdFRVED5afJQGDioUQE3v0aKIxRjAkErDECiqWKIRDsR9AxQYicgDv8SoiKogSBD6/P3Y/s3v77s7u7M7u63EO586dmd15s+97575n5lPMOYeIiORmk2IHICISZzqJioiEoJOoiEgIOomKiISgk6iISAg6iYqIhKCTqIhICKFOombWz8w+MbNFZjYyX0FJcSmv5Uu5zT/LtbG9mTUDFgLHAlXAbGCQc+7j/IUnUVNey5dyWxibhnjtgcAi59xiADN7HDgVaDAhZlbp3aNWOOdaFzuIJiiv2YtDXiHL3CqvmeU1zOV8e+DztO+rkuukYUuLHUAGlNfsxSGvoNxmK6O8hqlErZ51df5ymdklwCUhjiPRUl7LV5O5VV6zF+YkWgV0TPu+A/BF7Z2cc2OBsaDLg5hQXstXk7lVXrMX5nJ+NrCrmXU2s82AgcDk/IQlRaS8li/ltgByrkSdc+vNbBjwCtAMGOec+yhvkUlRKK/lS7ktjJybOOV0MF0ezHXO7V/sIPJNeVVey1RGeQ1zT1Sk4K6++moAttxySwD22WefYNuAAQNq7DtmzJh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ttKzSuU9+9sUfPqnMvpH3Aw8Era978FftvYviSSUMn/vs71847qXzZ5Tdu/2J9rsf+VfF5z/J0t9uda7H8Z5TXMKE71lfsH1d7JzC4BLgH2DnGscrG02AFkINu8SjzyChnkVnmtIaO8hrknmlG575wb6xKjqZwW4lgSnazy6mI4wk8FazK3ymv2wpxEq4COad93AL5oaGfn3EshjiXRySqvEivKbQGEOYnOBnY1s85mthkwEJicn7CkiJTX8qXcFkDO90Sdc+vNbBiJB0bNgHHOuY/yFpkUhfJavpTbwtBEddHShGblSXktT5qoTkSk0HQSFREJIerZPiOz9dZbB8t33XUXAJdeeikAc+fODbadeeaZACxdGpemfiJSSlSJioiEULaVaLt27YLliy++GICNGzcC0KtXr2DbSSedBMD9998fYXSSqZ49ewIwadIkADp16hTq/Y477rhgef78+QB8/vnnDe0uJebkk08GYPLkRMusYcOGAfDAAw8E+2zYsCHSmFSJioiEoJOoiEgIZXc537p1awAmTJjQxJ4SB3379gVg8803z8v7+ctBgAsvvBCAgQMH5uW9pTC22267YHn06NE1tv3tb38DYNy4ccG6n376KZrAklSJioiEUDaV6G9+8xsA+vdPzAJw4IEHZvS6ww47DIBNNkn8PZk3bx4As2bNyneIkoVNN038aJ5wwgl5fd/05m1XXXUVkGoOt2bNmrweS/LD/44CdOjQoca2xx57DIC1a9dGGlM6VaIiIiGUTSV6zz33AKlmTJk6/fTTa3z1je7PPvvsYJ/06kWiceSRRwJw8MEHA3DnnXfm5X1btkzNnNutW2JmjK222gpQJVpq/H3w3/3udw3u8/DDDwMQ5RggtakSFREJocmTqJmNM7PlZvZh2rpWZjbVzD5Nfm3Z2HtI6VFey5dyG60mh8Izs8OAH4CHnHPdk+vuBFY65+5ITrva0jl3XZMHK8DQWi+9lBgw//jjjwcyu5z/5ptvguUffvgBgJ133rnB/Zs1axYmxHQlM2RaKea1e/fuwfKMGTOAVK58LzOfr1z59wU45JBDgFTvtq+//jrXty2ZvEL+clvsofD23z/xkc6ePbvOtvXr1wPQvHnzQoa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QdBIVEQlBJ1ERkRB0EhURCSHqB0srgDXJr3GzPeHj3jkfgZQg5bU8Ka8ZiLTHEoCZzYlj7464xh2VuH4+cY07KnH9fKKMW5fzIiIh6CQqIhJCMU6iY4twzHyIa9xRievnE9e4oxLXzyeyuCO/JyoiUk50OS8iEkJkJ1Ez62dmn5jZIjMbGdVxs2VmHc1supnNN7OPzGx4cn0rM5tqZp8mv7YsdqylIg65VV6zp7xmGEMUl/Nm1gxYCBwLVAGzgUHOuZIbZyw5J3c759w7ZrYNMBfoD5wPrHTO3ZH8gWrpnLuuiKGWhLjkVnnNjvKauagq0QOBRc65xc65dcDjwKkRHTsrzrlq59w7yeXVwHygPYl4JyR3m0AiURKT3CqvWVNeMxTVSbQ9kD7zW1VyXUkzs05ADxJzdrd1zlVDInFAm4ZfWVFil1vlNSPKa4aiOonWNw92STcLMLMWwETgCufcqmLHU8JilVvlNWPKa4aiOolWAR3Tvu8AfBHRsbNmZs1JJORR59yk5Oqvkvdf/H2YSOZsjYHY5FZ5zYrymqGoTqKzgV3NrLOZbQYMBCZHdOysWGJS+geB+c65u9M2TQaGJJeHAM9FHVuJikVuldesKa+ZxhBVY3szOwH4C9AMGOecuy2SA2fJzA4BXgU+ADYmV48icZ/lSWAnYBlwpnNuZVGCLDFxyK3ymj3lNcMY1GNJRCR36rEkIhKCTqIiIiHoJCoiEoJOoiIiIegkKiISgk6iIiIh6CQqIhKCTqIiIiH8f426yqqIsOjrAAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 432x288 with 9 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import os\n",
"import tensorflow as tf\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
"mnist = tf.keras.datasets.mnist\n",
"(x_train, y_train),(x_test, y_test) = mnist.load_data(path=\"/data/data/mnist.npz\") #加载mnist数据集\n",
"\n",
"#验证mnist数据集大小。x为数据,y为标签。mnist每张图的像素为28*28\n",
"print(x_train.shape)\n",
"print(y_train.shape)\n",
"print(x_test.shape)\n",
"print(y_test.shape)\n",
"\n",
"#打印训练集中前9张,看看是什么数字\n",
"for i in range(9): \n",
" plt.subplot(3,3,1+i)\n",
" plt.imshow(x_train[i], cmap='gray')\n",
"plt.show()\n",
"\n",
"#打印相应的标签\n",
"print(y_train[:9])\n",
"\n",
"#基操:将像素标准化一下\n",
"x_train, x_test = x_train / 255.0, x_test / 255.0\n",
"\n",
"#搭建一个两层神经网络\n",
"model = tf.keras.models.Sequential([\n",
" tf.keras.layers.Flatten(input_shape=(28, 28)), #拉伸图像成一维向量\n",
" tf.keras.layers.Dense(128, activation='relu'), #第一层全连接+ReLU激活\n",
" tf.keras.layers.Dropout(0.2), #dropout层\n",
" tf.keras.layers.Dense(10, activation='softmax') #第二层全连接+softmax激活,输出预测标签\n",
"])\n",
"\n",
"#设置训练超参,优化器为sgd,损失函数为交叉熵,训练衡量指标为accuracy\n",
"model.compile(optimizer='sgd', loss='sparse_categorical_crossentropy', metrics=['accuracy'])\n",
"\n",
"#开始训练,训练5个epoch,一个epoch代表所有图像计算一遍。每一个epoch能观察到训练精度的提升\n",
"model.fit(x_train, y_train, epochs=9)\n",
"\n",
"#计算训练了5个epoch的模型在测试集上的表现\n",
"model.evaluate(x_test, y_test)\n",
"\n",
"\n",
"#直观看一下模型预测结果,打印测试集中的前9张图像\n",
"for i in range(9): \n",
" plt.subplot(3,3,1+i)\n",
" plt.imshow(x_test[i], cmap='gray')\n",
"plt.show()\n",
"\n",
"#打印模型识别的数字,是否正确?\n",
"np.argmax(model(x_test[:9]).numpy(), axis=1)\n",
"\n",
"#保存训练好的模型\n",
"model.save(\"/data/output/model_epoch_9\")"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"10000/10000 [==============================] - 0s 30us/sample - loss: 0.3818 - accuracy: 0.9001\n"
]
},
{
"data": {
"text/plain": [
"[0.381765931224823, 0.9001]"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"model.evaluate(x_test, y_test)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(60000, 28, 28)\n",
"(60000,)\n",
"(10000, 28, 28)\n",
"(10000,)\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAVEAAAD8CAYAAADOg5fGAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3XmQFPX5x/H3IyqigIIHIh7gFUDFW9FQSCJ44IFHRAmoGCOWN5YaieZnNF6oiRW8RUVQqaAJCmgkSBQlngENKeVQ0AhuRFFRQVQI8v39sfPt6YFddmZ7pnu69/Oqoranu2f7YZ7d3qe7v4c55xARkcbZIOkARETSTCdREZEIdBIVEYlAJ1ERkQh0EhURiUAnURGRCHQSFRGJINJJ1MyOMrN3zWyBmQ0rV1CSLOU1u5Tb8rPGNrY3s2bAe0AfoAaYAQxwzs0pX3gSN+U1u5TbytgwwnsPAhY45z4AMLNxQD+g3oSYWVPvHvW5c27rpINogPJaujTkFUrMrfJaXF6jXM53AD4Kva7JrZP6LUw6gCIor6VLQ15BuS1VUXmNUolaHevW+ctlZkOAIRGOI/FSXrOrwdwqr6WLchKtAXYIvd4e+HjtnZxzI4GRoMuDlFBes6vB3CqvpYtyOT8D2M3MOpnZxsBpwKTyhCUJUl6zS7mtgEZXos651WZ2ITAFaAaMcs7NLltkkgjlNbuU28podBOnRh1MlwdvOucOSDqIclNeldeMKiqv6rEkIhKBTqIiIhFEeTovUlX233//YPnCCy8E4IwzzgDgkUceAeDOO+8M9nnrrbdijE6ySpWoiEgEmX2w1KxZs2B58803r3c/X7FsuummAPzoRz8C4IILLgj2+f3vfw/AgAE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4pXLM6hpDuvqoEhURiaDBk6iZjTKzJWb2TmhdWzObambzc1/bVDZMKTflNbuU23gVczk/GrgLeCS0bhjwvHNueG7u6mHAleUPr3SbbropADvuuGO9+xx44IHB8rx584Am+SBqNFWc13vvvReACRMmFKz/3//yc6cV85ChdevWQH7cBN8sKswfY+bMmY0LtvqMpopzWyzfZG2TTTZJOJL1a7ASdc5NB5autbofMCa3PAY4ocxxSYUpr9ml3MarsQ+W2jnnFgM45xab2TZljCmSjz+unXdr9OjRwbprr722YJ/w66+++gqAu+66q9KhpUHV5HX16tUAfPTRR5G+z5FHHglAmzb1X73W1NQAsHLlykjHqnJVk9tSHXBAfnD511+vvklIK/50Pjdl8pBKH0fipbxmk/JausaeRD81s/a5v2jtgSX17eicGwmMhHjnbLn++uuD5bUrUalX1ee1WH5kpnPOOQeAFi1a1LvvNddcE0tMCSsqt0nl1V95AHz99ddAvivoLrvsElcYjdLYJk6TgDNzy2cCE8sTjiRMec0u5bZCGqxEzexPQC9gKzOrAX4LDAeeMLOzgUXAKZUMMqr1NcZuqrKQV2/gwIEADBs2LFi36667AoXjVK5t1qxZQOET/yxIY279swmAf/zjH0DhDBTVrMGTqHNuQD2bDi9zLBIj5TW7lNt4qceSiEgEmes7X5fGjjcpyfHTvJx++ukA9O7du959e/ToAaw/v3580PAl/7PPPgvAd999FylWadpUiYqIRNAkKlFJhz333DNYnjRpErD+7rul8A8rRo4cWZbvJ/HZcsstkw5hvVSJiohEoEpUqpIfS7KYMSWLacLmm8scffTRwbrJkydHCVFiUu1zpKkSFRGJQCdREZEImsTl/Pou93r27AloFKdq4Mf8BOjVqxcAgwYNAmDKlCkAfP/990V9r7PPPhuAiy66qIwRShz8lMlp6bGkSlREJAKLswF6UqP9/PDDD8D6G2N369YNgDlz5lQylDedcwc0vFu6VOMoTn4EoC+++KJg/XHHHRcsl/HBkvJaRieffDIAf/7zn4HCzhBdu3YFYpuJoqi8qhIVEYmgSdwTve+++wA499xz691nyJDacWiHDh0aS0xSW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vnEGbcu50VEItBJVEQkgiROoiMb3qUqpTXuuKT180lr3HFJ6+cTW9yx3xMVEckSXc6LiEQQ20nUzI4ys3fNbIGZDYvruKUysx3MbJqZzTWz2WZ2SW59WzObambzc1/bJB1rtUhDbpXX0imvRcYQx+W8mTUD3gP6ADXADGCAc25OxQ9eotyc3O2dc2+ZWSvgTeAEYDCw1Dk3PPcD1cY5d2WCoVaFtORWeS2N8lq8uCrRg4AFzrkPnHOrgHFAv5iOXRLn3GLn3Fu55eXAXKADtfGOye02htpESUpyq7yWTHktUlwn0Q7AR6HXNbl1Vc3MOgL7Am8A7Zxzi6E2ccA2yUVWVVKXW+W1KMprkeI6idY1D3ZVNwsws5bAeGCoc25Z0vFUsVTlVnktmvJapLhOojXADqHX2wMfx3TskpnZRtQmZKxz7snc6k9z91/8fZglScVXZVKTW+W1JMprkeI6ic4AdjOzTma2MXAaMCmmY5fEzAx4CJjrnLs9tGkS4CdIPxOYuPZ7m6hU5FZ5LZnyWmwMcTW2N7O+wB+BZsAo59yNsRy4RGbWA/gH8DawJrf6KmrvszwB7AgsAk5xzi1NJMgqk4bcKq+lU16LjEE9lkREGk89lkREItBJVEQkAp1ERUQi0ElURCQCnURFRCLQSVREJAKdREVEItBJVEQkgv8HsBGYJWmelc0AAAAASUVORK5CYII=\n",
"text/plain": [
"<Figure size 432x288 with 9 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"[5 0 4 1 9 2 1 3 1]\n",
"Epoch 1/15\n",
"60000/60000 [==============================] - 4s 64us/sample - loss: 0.2953 - accuracy: 0.9138\n",
"Epoch 2/15\n",
"60000/60000 [==============================] - 4s 61us/sample - loss: 0.1440 - accuracy: 0.9567\n",
"Epoch 3/15\n",
"60000/60000 [==============================] - 4s 63us/sample - loss: 0.1086 - accuracy: 0.9677\n",
"Epoch 4/15\n",
"60000/60000 [==============================] - 4s 62us/sample - loss: 0.0888 - accuracy: 0.9721\n",
"Epoch 5/15\n",
"60000/60000 [==============================] - 4s 62us/sample - loss: 0.0763 - accuracy: 0.9758\n",
"Epoch 6/15\n",
"60000/60000 [==============================] - 4s 61us/sample - loss: 0.0658 - accuracy: 0.9789\n",
"Epoch 7/15\n",
"60000/60000 [==============================] - 4s 60us/sample - loss: 0.0572 - accuracy: 0.9813\n",
"Epoch 8/15\n",
"60000/60000 [==============================] - 4s 61us/sample - loss: 0.0519 - accuracy: 0.9832\n",
"Epoch 9/15\n",
"60000/60000 [==============================] - 4s 62us/sample - loss: 0.0503 - accuracy: 0.9830\n",
"Epoch 10/15\n",
"60000/60000 [==============================] - 4s 62us/sample - loss: 0.0430 - accuracy: 0.9857\n",
"Epoch 11/15\n",
"60000/60000 [==============================] - 4s 61us/sample - loss: 0.0414 - accuracy: 0.9861\n",
"Epoch 12/15\n",
"60000/60000 [==============================] - 4s 62us/sample - loss: 0.0383 - accuracy: 0.9877\n",
"Epoch 13/15\n",
"60000/60000 [==============================] - 4s 61us/sample - loss: 0.0362 - accuracy: 0.9876\n",
"Epoch 14/15\n",
"60000/60000 [==============================] - 4s 61us/sample - loss: 0.0342 - accuracy: 0.9881\n",
"Epoch 15/15\n",
"60000/60000 [==============================] - ETA: 0s - loss: 0.0336 - accuracy: 0.98 - 4s 61us/sample - loss: 0.0336 - accuracy: 0.9884\n",
"10000/10000 [==============================] - 0s 37us/sample - loss: 0.0869 - accuracy: 0.9791\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAVEAAAD8CAYAAADOg5fGAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xe0FPX9//HnW8SKXwMKiICCYEMsgAWJvYEdFRVED5afJQGDioUQE3v0aKIxRjAkErDECiqWKIRDsR9AxQYicgDv8SoiKogSBD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8Kq9lKqO8qhIVEQkh6gdLK4A1ya9xsz3h4647L2x5UF7Lk/KagUgv5wHMbE4cL33iGndU4vr5xDXuqMT184kybl3Oi4iEoJOoiEgIxTiJji3CMfMhrnFHJa6fT1zjjkpcP5/I4o78nqiISDnR5byISAg6iYqIhBDZSdTM+pnZJ2a2yMxGRnXcbJlZRzObbmbzzewjMxueXN/KzKaa2afJry2LHWupiENuldfsKa8ZxhDFPVEzawYsBI4FqoDZwCDn3McFP3iWknNyt3POvWNm2wBzgf7A+cBK59wdyR+ols6564oYakmIS26V1+wor5mLqhI9EFjknFvsnFsHPA6cGtGxs+Kcq3bOvZNcXg3MB9qTiHdCcrcJJBIlMcmt8po15TVDoU6iWZT77YHP076vSq4raWbWCegBvA20dc5VQyJxQJviRVZYWV7GxS63lZpXKO/f2WLlNeeTaLLcvx84HugGDDKzbg3tXs+6km5bZWYtgInAFc65VcWOJypZ5hVilttKzSuU9+9sUfPqnMvpH3Aw8Era978FftvYviSSUMn/vs71847qXzZ5Tdu/2J9rsf+VfF5z/J0t9uda7H8Z5TXMKE71lfsH1d7JzC4BLgH2DnGscrG02AFkINu8SjzyChnkVnmtIaO8hrknmlG575wb6xKjqZwW4lgSnazy6mI4wk8FazK3ymv2wpxEq4COad93AL5oaGfn3EshjiXRySqvEivKbQGEOYnOBnY1s85mthkwEJicn7CkiJTX8qXcFkDO90Sdc+vNbBiJB0bNgHHOuY/yFpkUhfJavpTbwtBEddHShGblSXktT5qoTkSk0HQSFREJIerZPiOz9dZbB8t33XUXAJdeeikAc+fODbadeeaZACxdGpemfiJSSlSJioiEULaVaLt27YLliy++GICNGzcC0KtXr2DbSSedBMD9998fYXSSqZ49ewIwadIkADp16hTq/Y477rhgef78+QB8/vnnDe0uJebkk08GYPLkRMusYcOGAfDAAw8E+2zYsCHSmFSJioiEoJOoiEgIZXc537p1awAmTJjQxJ4SB3379gVg8803z8v7+ctBgAsvvBCAgQMH5uW9pTC22267YHn06NE1tv3tb38DYNy4ccG6n376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WGJS+geB+c65u9M2TQaGJJeHAM9FHVuJikVuldesKa+ZxhBVY3szOwH4C9AMGOecuy2SA2fJzA4BXgU+ADYmV48icZ/lSWAnYBlwpnNuZVGCLDFxyK3ymj3lNcMY1GNJRCR36rEkIhKCTqIiIiHoJCoiEoJOoiIiIegkKiISgk6iIiIh6CQqIhKCTqIiIiH8f426yqqIsOjrAAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 432x288 with 9 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import os\n",
"import tensorflow as tf\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
"mnist = tf.keras.datasets.mnist\n",
"(x_train, y_train),(x_test, y_test) = mnist.load_data(path=\"/data/data/mnist.npz\") #加载mnist数据集\n",
"\n",
"#验证mnist数据集大小。x为数据,y为标签。mnist每张图的像素为28*28\n",
"print(x_train.shape)\n",
"print(y_train.shape)\n",
"print(x_test.shape)\n",
"print(y_test.shape)\n",
"\n",
"#打印训练集中前9张,看看是什么数字\n",
"for i in range(9): \n",
" plt.subplot(3,3,1+i)\n",
" plt.imshow(x_train[i], cmap='gray')\n",
"plt.show()\n",
"\n",
"#打印相应的标签\n",
"print(y_train[:9])\n",
"\n",
"#基操:将像素标准化一下\n",
"x_train, x_test = x_train / 255.0, x_test / 255.0\n",
"\n",
"#搭建一个两层神经网络\n",
"model = tf.keras.models.Sequential([\n",
" tf.keras.layers.Flatten(input_shape=(28, 28)), #拉伸图像成一维向量\n",
" tf.keras.layers.Dense(128, activation='relu'), #第一层全连接+ReLU激活\n",
" tf.keras.layers.Dropout(0.2), #dropout层\n",
" tf.keras.layers.Dense(10, activation='softmax') #第二层全连接+softmax激活,输出预测标签\n",
"])\n",
"\n",
"#设置训练超参,优化器为sgd,损失函数为交叉熵,训练衡量指标为accuracy\n",
"model.compile(optimizer='Adam', loss='sparse_categorical_crossentropy', metrics=['accuracy'])\n",
"\n",
"#开始训练,训练5个epoch,一个epoch代表所有图像计算一遍。每一个epoch能观察到训练精度的提升\n",
"model.fit(x_train, y_train, epochs=15)\n",
"\n",
"#计算训练了5个epoch的模型在测试集上的表现\n",
"model.evaluate(x_test, y_test)\n",
"\n",
"\n",
"#直观看一下模型预测结果,打印测试集中的前9张图像\n",
"for i in range(9): \n",
" plt.subplot(3,3,1+i)\n",
" plt.imshow(x_test[i], cmap='gray')\n",
"plt.show()\n",
"\n",
"#打印模型识别的数字,是否正确?\n",
"np.argmax(model(x_test[:9]).numpy(), axis=1)\n",
"\n",
"#保存训练好的模型\n",
"model.save(\"/data/output/model_epoch_15\")"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"10000/10000 [==============================] - 0s 30us/sample - loss: 0.0869 - accuracy: 0.9791\n"
]
},
{
"data": {
"text/plain": [
"[0.08690820527771356, 0.9791]"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"model.evaluate(x_test, y_test)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "tensorflow-2.0",
"language": "python",
"name": "tensorflow-2.0"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}