From b85505a44cb39e808d3161921c87b1ee40df40fe Mon Sep 17 00:00:00 2001 From: carlfeynman Date: Thu, 14 Sep 2023 13:23:07 +0530 Subject: [PATCH] updated --- mnist_classifier.ipynb | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/mnist_classifier.ipynb b/mnist_classifier.ipynb index 5625a3f..236b990 100644 --- a/mnist_classifier.ipynb +++ b/mnist_classifier.ipynb @@ -180,7 +180,24 @@ "cell_type": "code", "execution_count": 109, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "train, epoch:1, loss: 0.1077, accuracy: 0.9104\n", + "eval, epoch:1, loss: 0.0382, accuracy: 0.9791\n", + "train, epoch:2, loss: 0.0410, accuracy: 0.9832\n", + "eval, epoch:2, loss: 0.0221, accuracy: 0.9866\n", + "train, epoch:3, loss: 0.0538, accuracy: 0.9871\n", + "eval, epoch:3, loss: 0.0141, accuracy: 0.9887\n", + "train, epoch:4, loss: 0.0343, accuracy: 0.9858\n", + "eval, epoch:4, loss: 0.0163, accuracy: 0.9871\n", + "train, epoch:5, loss: 0.0390, accuracy: 0.9865\n", + "eval, epoch:5, loss: 0.0169, accuracy: 0.9871\n" + ] + } + ], "source": [ "model = cnn_classifier()\n", "model.apply(kaiming_init)\n", @@ -210,7 +227,7 @@ }, { "cell_type": "code", - "execution_count": 95, + "execution_count": 110, "metadata": { "tags": [ "exclude" @@ -218,8 +235,8 @@ }, "outputs": [], "source": [ - "# with open('./classifier.pkl', 'wb') as model_file:\n", - "# pickle.dump(model, model_file)" + "with open('./classifier.pkl', 'wb') as model_file:\n", + " pickle.dump(model, model_file)" ] }, { @@ -235,7 +252,7 @@ }, { "cell_type": "code", - "execution_count": 96, + "execution_count": 111, "metadata": { "tags": [ "exclude" @@ -247,7 +264,7 @@ "output_type": "stream", "text": [ "[NbConvertApp] Converting notebook mnist_classifier.ipynb to script\n", - "[NbConvertApp] Writing 5934 bytes to mnist_classifier.py\n" + "[NbConvertApp] Writing 3691 bytes to mnist_classifier.py\n" ] } ],