Spaces:
Runtime error
Runtime error
carlfeynman
commited on
Commit
•
b85505a
1
Parent(s):
19d498a
updated
Browse files- mnist_classifier.ipynb +23 -6
mnist_classifier.ipynb
CHANGED
@@ -180,7 +180,24 @@
|
|
180 |
"cell_type": "code",
|
181 |
"execution_count": 109,
|
182 |
"metadata": {},
|
183 |
-
"outputs": [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
"source": [
|
185 |
"model = cnn_classifier()\n",
|
186 |
"model.apply(kaiming_init)\n",
|
@@ -210,7 +227,7 @@
|
|
210 |
},
|
211 |
{
|
212 |
"cell_type": "code",
|
213 |
-
"execution_count":
|
214 |
"metadata": {
|
215 |
"tags": [
|
216 |
"exclude"
|
@@ -218,8 +235,8 @@
|
|
218 |
},
|
219 |
"outputs": [],
|
220 |
"source": [
|
221 |
-
"
|
222 |
-
"
|
223 |
]
|
224 |
},
|
225 |
{
|
@@ -235,7 +252,7 @@
|
|
235 |
},
|
236 |
{
|
237 |
"cell_type": "code",
|
238 |
-
"execution_count":
|
239 |
"metadata": {
|
240 |
"tags": [
|
241 |
"exclude"
|
@@ -247,7 +264,7 @@
|
|
247 |
"output_type": "stream",
|
248 |
"text": [
|
249 |
"[NbConvertApp] Converting notebook mnist_classifier.ipynb to script\n",
|
250 |
-
"[NbConvertApp] Writing
|
251 |
]
|
252 |
}
|
253 |
],
|
|
|
180 |
"cell_type": "code",
|
181 |
"execution_count": 109,
|
182 |
"metadata": {},
|
183 |
+
"outputs": [
|
184 |
+
{
|
185 |
+
"name": "stdout",
|
186 |
+
"output_type": "stream",
|
187 |
+
"text": [
|
188 |
+
"train, epoch:1, loss: 0.1077, accuracy: 0.9104\n",
|
189 |
+
"eval, epoch:1, loss: 0.0382, accuracy: 0.9791\n",
|
190 |
+
"train, epoch:2, loss: 0.0410, accuracy: 0.9832\n",
|
191 |
+
"eval, epoch:2, loss: 0.0221, accuracy: 0.9866\n",
|
192 |
+
"train, epoch:3, loss: 0.0538, accuracy: 0.9871\n",
|
193 |
+
"eval, epoch:3, loss: 0.0141, accuracy: 0.9887\n",
|
194 |
+
"train, epoch:4, loss: 0.0343, accuracy: 0.9858\n",
|
195 |
+
"eval, epoch:4, loss: 0.0163, accuracy: 0.9871\n",
|
196 |
+
"train, epoch:5, loss: 0.0390, accuracy: 0.9865\n",
|
197 |
+
"eval, epoch:5, loss: 0.0169, accuracy: 0.9871\n"
|
198 |
+
]
|
199 |
+
}
|
200 |
+
],
|
201 |
"source": [
|
202 |
"model = cnn_classifier()\n",
|
203 |
"model.apply(kaiming_init)\n",
|
|
|
227 |
},
|
228 |
{
|
229 |
"cell_type": "code",
|
230 |
+
"execution_count": 110,
|
231 |
"metadata": {
|
232 |
"tags": [
|
233 |
"exclude"
|
|
|
235 |
},
|
236 |
"outputs": [],
|
237 |
"source": [
|
238 |
+
"with open('./classifier.pkl', 'wb') as model_file:\n",
|
239 |
+
" pickle.dump(model, model_file)"
|
240 |
]
|
241 |
},
|
242 |
{
|
|
|
252 |
},
|
253 |
{
|
254 |
"cell_type": "code",
|
255 |
+
"execution_count": 111,
|
256 |
"metadata": {
|
257 |
"tags": [
|
258 |
"exclude"
|
|
|
264 |
"output_type": "stream",
|
265 |
"text": [
|
266 |
"[NbConvertApp] Converting notebook mnist_classifier.ipynb to script\n",
|
267 |
+
"[NbConvertApp] Writing 3691 bytes to mnist_classifier.py\n"
|
268 |
]
|
269 |
}
|
270 |
],
|