{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"# Image Classification Data (Fashion-MNIST)\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"ExecuteTime": {
"end_time": "2019-07-03T22:01:31.154647Z",
"start_time": "2019-07-03T22:01:29.325928Z"
},
"attributes": {
"classes": [],
"id": "",
"n": "7"
}
},
"outputs": [],
"source": [
"%matplotlib inline\n",
"import d2l\n",
"from mxnet import gluon \n",
"d2l.use_svg_display()"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"Use the provided `FashionMNIST` class to download and load a dataset. "
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"ExecuteTime": {
"end_time": "2019-07-03T22:01:31.761507Z",
"start_time": "2019-07-03T22:01:31.157805Z"
}
},
"outputs": [
{
"data": {
"text/plain": [
"(60000, 10000)"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"mnist_train = gluon.data.vision.FashionMNIST(train=True)\n",
"mnist_test = gluon.data.vision.FashionMNIST(train=False)\n",
"\n",
"len(mnist_train), len(mnist_test)"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"Visualize the images"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"ExecuteTime": {
"end_time": "2019-07-03T22:01:54.004645Z",
"start_time": "2019-07-03T22:01:53.213167Z"
},
"attributes": {
"classes": [],
"id": "",
"n": "25"
}
},
"outputs": [
{
"data": {
"image/svg+xml": [
"\n",
"\n",
"\n",
"\n"
],
"text/plain": [
"