{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## CIFAR 10" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": true }, "outputs": [], "source": [ "%matplotlib inline\n", "%reload_ext autoreload\n", "%autoreload 2" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You can get the data via:\n", "\n", " wget http://pjreddie.com/media/files/cifar.tgz", " \n", "**Important:** Before proceeding, the student must reorganize the downloaded dataset files to match the expected directory structure, so that there is a dedicated folder for each class under 'test' and 'train', e.g.:\n", "\n", "```\n", "* test/airplane/airplane-1001.png\n", "* test/bird/bird-1043.png\n", "\n", "* train/bird/bird-10018.png\n", "* train/automobile/automobile-10000.png\n", "```\n", "\n", "The filename of the image doesn't have to include its class." ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "labels.txt test train\n", "airplane automobile bird cat deer dog frog horse ship truck\n" ] } ], "source": [ "from fastai.conv_learner import *\n", "PATH = \"data/cifar10/\"\n", "os.makedirs(PATH,exist_ok=True)\n", "\n", "!ls {PATH}\n", "\n", "if not os.path.exists(f\"{PATH}/train/bird\"):\n", " raise Exception(\"expecting class subdirs under 'train/' and 'test/'\")\n", "!ls {PATH}/train" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": true }, "outputs": [], "source": [ "classes = ('plane', 'car', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck')\n", "stats = (np.array([ 0.4914 , 0.48216, 0.44653]), np.array([ 0.24703, 0.24349, 0.26159]))" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": true }, "outputs": [], "source": [ "def get_data(sz,bs):\n", " tfms = tfms_from_stats(stats, sz, aug_tfms=[RandomFlip()], pad=sz//8)\n", " return ImageClassifierData.from_paths(PATH, val_name='test', tfms=tfms, bs=bs)" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": true }, "outputs": [], "source": [ "bs=256" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Look at data" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": true }, "outputs": [], "source": [ "data = get_data(32,4)" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "collapsed": true }, "outputs": [], "source": [ "x,y=next(iter(data.trn_dl))" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAP8AAAD8CAYAAAC4nHJkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGfRJREFUeJztnV2MJNd133+nq7vnc2e5y10uh8sll5ZoQ7IdUcqGFqBA\nUKzEYAQDlIDYkB4EPgheIzCBKHAeCAWIFCAPchBJ0JOClUWYDhR9xJIgwjASC4QDwi8UVxJFUWZs\nkQxlLbne5ceu9mt2prvr5KGbxpKuc2Y4M11N5v5/wGC66/atOnWrTlX1/fc5x9wdIUR5dGZtgBBi\nNsj5hSgUOb8QhSLnF6JQ5PxCFIqcX4hCkfMLUShyfiEKRc4vRKF0d9LZzO4CPg9UwB+6+6c3+bx+\nTijElHF328rnbLs/7zWzCvgb4F8Ap4BHgY+4+18lfeT8QkyZrTr/Th777wSecvdn3H0D+Cpw9w7W\nJ4RokZ04/2HgZ9e8PzVZJoR4E7CT7/xNjxb/4LHezI4Dx3ewHSHEFNiJ858Cjlzz/mbg+dd+yN1P\nACdA3/mFeCOxk8f+R4Hbzew2M+sDHwYe3B2zhBDTZtt3fncfmtm9wP9iLPXd7+4/3jXLhBBTZdtS\n37Y2psd+IaZOG1KfEOJNjJxfiEKR8wtRKHJ+IQpFzi9Eoewoqu/1smffzRx7/79tbOt5L+xXUzcu\nt+TS1e3FuzYYDMM2S9SPxf5c0LI9ESMTWqrEfqp4x60TTPQm2xqNRnFbItAMPB7HaOess737jSUT\n2FUnPnei8fC6+ZwCMIu3tUE8Vn2L2zqd+HiOfNC4/E//8N6wz26gO78QhSLnF6JQ5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MhmPr5lZnE10K7h7q39AxTgN2C8AfeCHwNvbtmNi\ny7PAgRls973Au4Anrln2n4H7Jq/vA/5gRnZ8Cvh3LY/HKvCuyes9wN8Ab297TBI7Wh0TwIDlyese\n8AjjBDpfBz48Wf5fgX+9k+3M4s5/J/CUuz/j41TfXwXunoEdM8PdHwZefs3iuxknQoWWEqIGdrSO\nu5929+9PXl9knCzmMC2PSWJHq/iYqSfNnYXzHwZ+ds37WSb/dODPzex7ZnZ8Rja8wiF3Pw3jkxC4\nYYa23Gtmj0++Fkz968e1mNlRxvkjHmGGY/IaO6DlMWkjae4snL8ptcqsJIf3uPu7gH8J/J6ZvXdG\ndryR+ALwFsY1Gk4Dn2lrw2a2DHwD+Li7X2hru1uwo/Ux8R0kzd0qs3D+U8CRa96HyT+njbs/P/l/\nFvgWs81MdMbMVgEm/8/Owgh3PzM58Wrgi7Q0JmbWY+xwX3b3b04Wtz4mTXbMakwm237dSXO3yiyc\n/1Hg9snMZR/4MPBg20aY2ZKZ7XnlNfAbwBN5r6nyIONEqDDDhKivONuED9HCmJiZMc4B+aS7f/aa\nplbHJLKj7TFpLWluWzOYr5nN/ADjmdSngX8/Ixt+gbHS8EPgx23aAXyF8ePjgPGT0MeA64GHgJ9M\n/u+fkR3/DfgR8Dhj51ttwY5/yvgR9nHgscnfB9oek8SOVscE+EeMk+I+zvhC8x+uOWe/CzwF/A9g\nbifb0S/8hCgU/cJPiEKR8wtRKHJ+IQpFzi9Eocj5hSgUOb8QhSLnF6JQ5PxCFMr/A0Nq4c6QHuIf\nAAAAAElFTkSuQmCC\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "plt.imshow(data.trn_ds.denorm(x)[0]);" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAP8AAAD8CAYAAAC4nHJkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHI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is9aV15ArRAqsIEFUW8GW51PoQlrYmaGWg3IY+7+tVtMTV0T5kez16RpRXObtYO5bDfzE6jtpJ4C\n8B83yIf7UVMajgB4u5l+APguah8fS6h9EvocgH4ALwI4Uf/bt0F+/DmANwEcRS34hpvgx79E7SPs\nUQCH6/8+0ew1ifjR1DUB8ChqRXGPovZG859uOWdfBXASwP8E0Lqa4+gXfkIkin7hJ0SiKPiFSBQF\nvxCJouAXIlEU/EIkioJfiERR8AuRKAp+IRLl/wP/fUEOJOcezwAAAABJRU5ErkJggg==\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "plt.imshow(data.trn_ds.denorm(x)[1]);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Fully connected model" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": true }, "outputs": [], "source": [ "data = get_data(32,bs)" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "collapsed": true }, "outputs": [], "source": [ "lr=1e-2" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "From [this notebook](https://github.com/KeremTurgutlu/deeplearning/blob/master/Exploring%20Optimizers.ipynb) by our student Kerem Turgutlu:" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": true }, "outputs": [], "source": [ "class SimpleNet(nn.Module):\n", " def __init__(self, layers):\n", " super().__init__()\n", " self.layers = nn.ModuleList([\n", " nn.Linear(layers[i], layers[i + 1]) for i in range(len(layers) - 1)])\n", " \n", " def forward(self, x):\n", " x = x.view(x.size(0), -1)\n", " for l in self.layers:\n", " l_x = l(x)\n", " x = F.relu(l_x)\n", " return F.log_softmax(l_x, dim=-1)" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "collapsed": true }, "outputs": [], "source": [ "learn = ConvLearner.from_model_data(SimpleNet([32*32*3, 40,10]), data)" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(SimpleNet(\n", " (layers): ModuleList(\n", " (0): Linear(in_features=3072, out_features=40)\n", " (1): Linear(in_features=40, out_features=10)\n", " )\n", " ), [122880, 40, 400, 10])" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "learn, [o.numel() for o in learn.model.parameters()]" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "OrderedDict([('Linear-1',\n", " OrderedDict([('input_shape', [-1, 3072]),\n", " ('output_shape', [-1, 40]),\n", " ('trainable', True),\n", " ('nb_params', 122920)])),\n", " ('Linear-2',\n", " OrderedDict([('input_shape', [-1, 40]),\n", " ('output_shape', [-1, 10]),\n", " ('trainable', True),\n", " ('nb_params', 410)]))])" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "learn.summary()" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "collapsed": true }, "outputs": [], "source": [ "learn.lr_find()" ] }, { "cell_type": "code", "execution_count": 30, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "\n", " \u001b[A\u001b[A" ] }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEOCAYAAACaQSCZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd8VvX5//HXlQ0khJGwR9h7GhRExFVEHLhFcVVbpNWv\nu9qq7bfVttpatW5Frf1qcaPWgVtRqTICyt5DCQJhr4SEJNfvj/vGXxoD3MHcOXeS9/PxuB859zmf\nc+4rH0LeOedzhrk7IiIiBxMXdAEiIlIzKDBERCQiCgwREYmIAkNERCKiwBARkYgoMEREJCIKDBER\niYgCQ0REIqLAEBGRiCgwREQkIglBF1CVMjIyPCsrK+gyRERqjFmzZm1y98xI2taqwMjKyiInJyfo\nMkREagwz+ybStjokJSIiEVFgiIhIRBQYIiISEQWGiIhERIEhIiIRUWCIiEhEFBgV2Lq7iBmrtlBY\nXPKDZflFxWzYsYc9e3+4TESkNqtV12Ecqu35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ISIiEVFgiIhIRP4f\n/7E/e5eZ0zEAAAAASUVORK5CYII=\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "learn.sched.plot()" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "b1434a390cc24207af4ac1427f681e3e", "version_major": 2, "version_minor": 0 }, "text/plain": [ "A Jupyter Widget" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "[ 0. 1.7658 1.64148 0.42129] \n", "[ 1. 1.68074 1.57897 0.44131] \n", "\n", "CPU times: user 1min 11s, sys: 32.3 s, total: 1min 44s\n", "Wall time: 55.1 s\n" ] } ], "source": [ "%time learn.fit(lr, 2)" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "0f42d62186f64e33a6037d8f5beb9f57", "version_major": 2, "version_minor": 0 }, "text/plain": [ "A Jupyter Widget" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "[ 0. 1.60857 1.51711 0.46631] \n", "[ 1. 1.59361 1.50341 0.46924] \n", "\n", "CPU times: user 1min 12s, sys: 31.8 s, total: 1min 44s\n", "Wall time: 55.3 s\n" ] } ], "source": [ "%time learn.fit(lr, 2, cycle_len=1)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## CNN" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "collapsed": true }, "outputs": [], "source": [ "class ConvNet(nn.Module):\n", " def __init__(self, layers, c):\n", " super().__init__()\n", " self.layers = nn.ModuleList([\n", " nn.Conv2d(layers[i], layers[i + 1], kernel_size=3, stride=2)\n", " for i in range(len(layers) - 1)])\n", " self.pool = nn.AdaptiveMaxPool2d(1)\n", " self.out = nn.Linear(layers[-1], c)\n", " \n", " def forward(self, x):\n", " for l in self.layers: x = F.relu(l(x))\n", " x = self.pool(x)\n", " x = x.view(x.size(0), -1)\n", " return F.log_softmax(self.out(x), dim=-1)" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "collapsed": true }, "outputs": [], "source": [ "learn = ConvLearner.from_model_data(ConvNet([3, 20, 40, 80], 10), data)" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "OrderedDict([('Conv2d-1',\n", " OrderedDict([('input_shape', [-1, 3, 32, 32]),\n", " ('output_shape', [-1, 20, 15, 15]),\n", " ('trainable', True),\n", " ('nb_params', 560)])),\n", " ('Conv2d-2',\n", " OrderedDict([('input_shape', [-1, 20, 15, 15]),\n", " ('output_shape', [-1, 40, 7, 7]),\n", " ('trainable', True),\n", " ('nb_params', 7240)])),\n", " ('Conv2d-3',\n", " OrderedDict([('input_shape', [-1, 40, 7, 7]),\n", " ('output_shape', [-1, 80, 3, 3]),\n", " ('trainable', True),\n", " ('nb_params', 28880)])),\n", " ('AdaptiveMaxPool2d-4',\n", " OrderedDict([('input_shape', [-1, 80, 3, 3]),\n", " ('output_shape', [-1, 80, 1, 1]),\n", " ('nb_params', 0)])),\n", " ('Linear-5',\n", " OrderedDict([('input_shape', [-1, 80]),\n", " ('output_shape', [-1, 10]),\n", " ('trainable', True),\n", " ('nb_params', 810)]))])" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "learn.summary()" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "d565d2bc5ccf4f02926d0258085419b7", "version_major": 2, "version_minor": 0 }, "text/plain": [ "A Jupyter Widget" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " 70%|███████ | 138/196 [00:16<00:09, 6.42it/s, loss=2.49]" ] } ], "source": [ "learn.lr_find(end_lr=100)" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAA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Enffa8nnbC8C\nTnP3HYMcw6eBJne/uY/ti4BWd3czu4xkkX1+WoPsPZ6ngPnuXp+pGGTwqSYiknS/mY0gWSC/frAT\nSOBnwHv60f4EkoVwA/aQPHMrI8yskmR9SAlkmNFIREREUqaaiIiIpExJREREUqYkIiIiKVMSERGR\nlCmJiIhIypREREQkZf8fhD6p+kyx6AgAAAAASUVORK5CYII=\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "learn.sched.plot()" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "c1285ab3ded54265bb94ee2bd513493f", "version_major": 2, "version_minor": 0 }, "text/plain": [ "A Jupyter Widget" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "[ 0. 1.72594 1.63399 0.41338] \n", "[ 1. 1.51599 1.49687 0.45723] \n", "\n", "CPU times: user 1min 14s, sys: 32.3 s, total: 1min 46s\n", "Wall time: 56.5 s\n" ] } ], "source": [ "%time learn.fit(1e-1, 2)" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "5ced4fe4a75a4425a4edc3fac43af952", "version_major": 2, "version_minor": 0 }, "text/plain": [ "A Jupyter Widget" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "[ 0. 1.36734 1.28901 0.53418] \n", "[ 1. 1.28854 1.21991 0.56143] \n", "[ 2. 1.22854 1.15514 0.58398] \n", "[ 3. 1.17904 1.12523 0.59922] \n", "\n", "CPU times: user 2min 21s, sys: 1min 3s, total: 3min 24s\n", "Wall time: 1min 46s\n" ] } ], "source": [ "%time learn.fit(1e-1, 4, cycle_len=1)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Refactored" ] }, { "cell_type": "code", "execution_count": 23, "metadata": { "collapsed": true }, "outputs": [], "source": [ "class ConvLayer(nn.Module):\n", " def __init__(self, ni, nf):\n", " super().__init__()\n", " self.conv = nn.Conv2d(ni, nf, kernel_size=3, stride=2, padding=1)\n", " \n", " def forward(self, x): return F.relu(self.conv(x))" ] }, { "cell_type": "code", "execution_count": 45, "metadata": { "collapsed": true }, "outputs": [], "source": [ "class ConvNet2(nn.Module):\n", " def __init__(self, layers, c):\n", " super().__init__()\n", " self.layers = nn.ModuleList([ConvLayer(layers[i], layers[i + 1])\n", " for i in range(len(layers) - 1)])\n", " self.out = nn.Linear(layers[-1], c)\n", " \n", " def forward(self, x):\n", " for l in self.layers: x = l(x)\n", " x = F.adaptive_max_pool2d(x, 1)\n", " x = x.view(x.size(0), -1)\n", " return F.log_softmax(self.out(x), dim=-1)" ] }, { "cell_type": "code", "execution_count": 46, "metadata": { "collapsed": true }, "outputs": [], "source": [ "learn = ConvLearner.from_model_data(ConvNet2([3, 20, 40, 80], 10), data)" ] }, { "cell_type": "code", "execution_count": 47, "metadata": { "collapsed": true }, "outputs": [ { "data": { "text/plain": [ "OrderedDict([('Conv2d-1',\n", " OrderedDict([('input_shape', [-1, 3, 32, 32]),\n", " ('output_shape', [-1, 20, 16, 16]),\n", " ('trainable', True),\n", " ('nb_params', 560)])),\n", " ('ConvLayer-2',\n", " OrderedDict([('input_shape', [-1, 3, 32, 32]),\n", " ('output_shape', [-1, 20, 16, 16]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-3',\n", " OrderedDict([('input_shape', [-1, 20, 16, 16]),\n", " ('output_shape', [-1, 40, 8, 8]),\n", " ('trainable', True),\n", " ('nb_params', 7240)])),\n", " ('ConvLayer-4',\n", " OrderedDict([('input_shape', [-1, 20, 16, 16]),\n", " ('output_shape', [-1, 40, 8, 8]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-5',\n", " OrderedDict([('input_shape', [-1, 40, 8, 8]),\n", " ('output_shape', [-1, 80, 4, 4]),\n", " ('trainable', True),\n", " ('nb_params', 28880)])),\n", " ('ConvLayer-6',\n", " OrderedDict([('input_shape', [-1, 40, 8, 8]),\n", " ('output_shape', [-1, 80, 4, 4]),\n", " ('nb_params', 0)])),\n", " ('Linear-7',\n", " OrderedDict([('input_shape', [-1, 80]),\n", " ('output_shape', [-1, 10]),\n", " ('trainable', True),\n", " ('nb_params', 810)]))])" ] }, "execution_count": 47, "metadata": {}, "output_type": "execute_result" } ], "source": [ "learn.summary()" ] }, { "cell_type": "code", "execution_count": 48, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "27475f522efa4c8aa396ab71a7d8d6cb", "version_major": 2, "version_minor": 0 }, "text/plain": [ "A Jupyter Widget" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "[ 0. 1.70151 1.64982 0.3832 ] \n", "[ 1. 1.50838 1.53231 0.44795] \n", "\n", "CPU times: user 1min 6s, sys: 28.5 s, total: 1min 35s\n", "Wall time: 48.8 s\n" ] } ], "source": [ "%time learn.fit(1e-1, 2)" ] }, { "cell_type": "code", "execution_count": 49, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "53263fbac4df4d68a529026d9fcbbd91", "version_major": 2, "version_minor": 0 }, "text/plain": [ "A Jupyter Widget" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "[ 0. 1.51605 1.42927 0.4751 ] \n", "[ 1. 1.40143 1.33511 0.51787] \n", "\n", "CPU times: user 1min 6s, sys: 27.7 s, total: 1min 34s\n", "Wall time: 48.7 s\n" ] } ], "source": [ "%time learn.fit(1e-1, 2, cycle_len=1)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## BatchNorm" ] }, { "cell_type": "code", "execution_count": 17, "metadata": { "collapsed": true }, "outputs": [], "source": [ "class BnLayer(nn.Module):\n", " def __init__(self, ni, nf, stride=2, kernel_size=3):\n", " super().__init__()\n", " self.conv = nn.Conv2d(ni, nf, kernel_size=kernel_size, stride=stride,\n", " bias=False, padding=1)\n", " self.a = nn.Parameter(torch.zeros(nf,1,1))\n", " self.m = nn.Parameter(torch.ones(nf,1,1))\n", " \n", " def forward(self, x):\n", " x = F.relu(self.conv(x))\n", " x_chan = x.transpose(0,1).contiguous().view(x.size(1), -1)\n", " if self.training:\n", " self.means = x_chan.mean(1)[:,None,None]\n", " self.stds = x_chan.std (1)[:,None,None]\n", " return (x-self.means) / self.stds *self.m + self.a" ] }, { "cell_type": "code", "execution_count": 18, "metadata": { "collapsed": true }, "outputs": [], "source": [ "class ConvBnNet(nn.Module):\n", " def __init__(self, layers, c):\n", " super().__init__()\n", " self.conv1 = nn.Conv2d(3, 10, kernel_size=5, stride=1, padding=2)\n", " self.layers = nn.ModuleList([BnLayer(layers[i], layers[i + 1])\n", " for i in range(len(layers) - 1)])\n", " self.out = nn.Linear(layers[-1], c)\n", " \n", " def forward(self, x):\n", " x = self.conv1(x)\n", " for l in self.layers: x = l(x)\n", " x = F.adaptive_max_pool2d(x, 1)\n", " x = x.view(x.size(0), -1)\n", " return F.log_softmax(self.out(x), dim=-1)" ] }, { "cell_type": "code", "execution_count": 20, "metadata": { "collapsed": true }, "outputs": [], "source": [ "learn = ConvLearner.from_model_data(ConvBnNet([10, 20, 40, 80, 160], 10), data)" ] }, { "cell_type": "code", "execution_count": 21, "metadata": { "collapsed": true }, "outputs": [ { "data": { "text/plain": [ "OrderedDict([('Conv2d-1',\n", " OrderedDict([('input_shape', [-1, 3, 32, 32]),\n", " ('output_shape', [-1, 10, 32, 32]),\n", " ('trainable', True),\n", " ('nb_params', 760)])),\n", " ('Conv2d-2',\n", " OrderedDict([('input_shape', [-1, 10, 32, 32]),\n", " ('output_shape', [-1, 20, 16, 16]),\n", " ('trainable', True),\n", " ('nb_params', 1800)])),\n", " ('BnLayer-3',\n", " OrderedDict([('input_shape', [-1, 10, 32, 32]),\n", " ('output_shape', [-1, 20, 16, 16]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-4',\n", " OrderedDict([('input_shape', [-1, 20, 16, 16]),\n", " ('output_shape', [-1, 40, 8, 8]),\n", " ('trainable', True),\n", " ('nb_params', 7200)])),\n", " ('BnLayer-5',\n", " OrderedDict([('input_shape', [-1, 20, 16, 16]),\n", " ('output_shape', [-1, 40, 8, 8]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-6',\n", " OrderedDict([('input_shape', [-1, 40, 8, 8]),\n", " ('output_shape', [-1, 80, 4, 4]),\n", " ('trainable', True),\n", " ('nb_params', 28800)])),\n", " ('BnLayer-7',\n", " OrderedDict([('input_shape', [-1, 40, 8, 8]),\n", " ('output_shape', [-1, 80, 4, 4]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-8',\n", " OrderedDict([('input_shape', [-1, 80, 4, 4]),\n", " ('output_shape', [-1, 160, 2, 2]),\n", " ('trainable', True),\n", " ('nb_params', 115200)])),\n", " ('BnLayer-9',\n", " OrderedDict([('input_shape', [-1, 80, 4, 4]),\n", " ('output_shape', [-1, 160, 2, 2]),\n", " ('nb_params', 0)])),\n", " ('Linear-10',\n", " OrderedDict([('input_shape', [-1, 160]),\n", " ('output_shape', [-1, 10]),\n", " ('trainable', True),\n", " ('nb_params', 1610)]))])" ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "learn.summary()" ] }, { "cell_type": "code", "execution_count": 22, "metadata": { "scrolled": false }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "4cb9114a5d804bab9fe1ded933eae9f4", "version_major": 2, "version_minor": 0 }, "text/plain": [ "A Jupyter Widget" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "[ 0. 1.4966 1.39257 0.48965] \n", "[ 1. 1.2975 1.20827 0.57148] \n", "\n", "CPU times: user 1min 16s, sys: 32.5 s, total: 1min 49s\n", "Wall time: 54.3 s\n" ] } ], "source": [ "%time learn.fit(3e-2, 2)" ] }, { "cell_type": "code", "execution_count": 23, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "4311194e230b43a89c1a842948a030b5", "version_major": 2, "version_minor": 0 }, "text/plain": [ "A Jupyter Widget" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "[ 0. 1.20966 1.07735 0.61504] \n", "[ 1. 1.0771 0.97338 0.65215] \n", "[ 2. 1.00103 0.91281 0.67402] \n", "[ 3. 0.93574 0.89293 0.68135] \n", "\n", "CPU times: user 2min 34s, sys: 1min 4s, total: 3min 39s\n", "Wall time: 1min 50s\n" ] } ], "source": [ "%time learn.fit(1e-1, 4, cycle_len=1)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Deep BatchNorm" ] }, { "cell_type": "code", "execution_count": 47, "metadata": { "collapsed": true }, "outputs": [], "source": [ "class ConvBnNet2(nn.Module):\n", " def __init__(self, layers, c):\n", " super().__init__()\n", " self.conv1 = nn.Conv2d(3, 10, kernel_size=5, stride=1, padding=2)\n", " self.layers = nn.ModuleList([BnLayer(layers[i], layers[i+1])\n", " for i in range(len(layers) - 1)])\n", " self.layers2 = nn.ModuleList([BnLayer(layers[i+1], layers[i + 1], 1)\n", " for i in range(len(layers) - 1)])\n", " self.out = nn.Linear(layers[-1], c)\n", " \n", " def forward(self, x):\n", " x = self.conv1(x)\n", " for l,l2 in zip(self.layers, self.layers2):\n", " x = l(x)\n", " x = l2(x)\n", " x = F.adaptive_max_pool2d(x, 1)\n", " x = x.view(x.size(0), -1)\n", " return F.log_softmax(self.out(x), dim=-1)" ] }, { "cell_type": "code", "execution_count": 48, "metadata": { "collapsed": true }, "outputs": [], "source": [ "learn = ConvLearner.from_model_data(ConvBnNet2([10, 20, 40, 80, 160], 10), data)" ] }, { "cell_type": "code", "execution_count": 49, "metadata": { "scrolled": false }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "97674b4107f24900a78b115739f1b294", "version_major": 2, "version_minor": 0 }, "text/plain": [ "A Jupyter Widget" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "[ 0. 1.53499 1.43782 0.47588] \n", "[ 1. 1.28867 1.22616 0.55537] \n", "\n", "CPU times: user 1min 22s, sys: 34.5 s, total: 1min 56s\n", "Wall time: 58.2 s\n" ] } ], "source": [ "%time learn.fit(1e-2, 2)" ] }, { "cell_type": "code", "execution_count": 50, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "e1f4198b659c497fb131aaafbdbe449b", "version_major": 2, "version_minor": 0 }, "text/plain": [ "A Jupyter Widget" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "[ 0. 1.10933 1.06439 0.61582] \n", "[ 1. 1.04663 0.98608 0.64609] \n", "\n", "CPU times: user 1min 21s, sys: 32.9 s, total: 1min 54s\n", "Wall time: 57.6 s\n" ] } ], "source": [ "%time learn.fit(1e-2, 2, cycle_len=1)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Resnet" ] }, { "cell_type": "code", "execution_count": 53, "metadata": { "collapsed": true }, "outputs": [], "source": [ "class ResnetLayer(BnLayer):\n", " def forward(self, x): return x + super().forward(x)" ] }, { "cell_type": "code", "execution_count": 54, "metadata": { "collapsed": true }, "outputs": [], "source": [ "class Resnet(nn.Module):\n", " def __init__(self, layers, c):\n", " super().__init__()\n", " self.conv1 = nn.Conv2d(3, 10, kernel_size=5, stride=1, padding=2)\n", " self.layers = nn.ModuleList([BnLayer(layers[i], layers[i+1])\n", " for i in range(len(layers) - 1)])\n", " self.layers2 = nn.ModuleList([ResnetLayer(layers[i+1], layers[i + 1], 1)\n", " for i in range(len(layers) - 1)])\n", " self.layers3 = nn.ModuleList([ResnetLayer(layers[i+1], layers[i + 1], 1)\n", " for i in range(len(layers) - 1)])\n", " self.out = nn.Linear(layers[-1], c)\n", " \n", " def forward(self, x):\n", " x = self.conv1(x)\n", " for l,l2,l3 in zip(self.layers, self.layers2, self.layers3):\n", " x = l3(l2(l(x)))\n", " x = F.adaptive_max_pool2d(x, 1)\n", " x = x.view(x.size(0), -1)\n", " return F.log_softmax(self.out(x), dim=-1)" ] }, { "cell_type": "code", "execution_count": 55, "metadata": { "collapsed": true }, "outputs": [], "source": [ "learn = ConvLearner.from_model_data(Resnet([10, 20, 40, 80, 160], 10), data)" ] }, { "cell_type": "code", "execution_count": 56, "metadata": { "collapsed": true }, "outputs": [], "source": [ "wd=1e-5" ] }, { "cell_type": "code", "execution_count": 57, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "df09e75913b1421cbbd6a1972d501799", "version_major": 2, "version_minor": 0 }, "text/plain": [ "A Jupyter Widget" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "[ 0. 1.58191 1.40258 0.49131] \n", "[ 1. 1.33134 1.21739 0.55625] \n", "\n", "CPU times: user 1min 27s, sys: 34.3 s, total: 2min 1s\n", "Wall time: 1min 3s\n" ] } ], "source": [ "%time learn.fit(1e-2, 2, wds=wd)" ] }, { "cell_type": "code", "execution_count": 58, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "b3a4151f72b84c40a8df56b6aea340bb", "version_major": 2, "version_minor": 0 }, "text/plain": [ "A Jupyter Widget" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "[ 0. 1.11534 1.05117 0.62549] \n", "[ 1. 1.06272 0.97874 0.65185] \n", "[ 2. 0.92913 0.90472 0.68154] \n", "[ 3. 0.97932 0.94404 0.67227] \n", "[ 4. 0.88057 0.84372 0.70654] \n", "[ 5. 0.77817 0.77815 0.73018] \n", "[ 6. 0.73235 0.76302 0.73633] \n", "\n", "CPU times: user 5min 2s, sys: 1min 59s, total: 7min 1s\n", "Wall time: 3min 39s\n" ] } ], "source": [ "%time learn.fit(1e-2, 3, cycle_len=1, cycle_mult=2, wds=wd)" ] }, { "cell_type": "code", "execution_count": 59, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "849a1d31a0ca4c39bacd99d34603d642", "version_major": 2, "version_minor": 0 }, "text/plain": [ "A Jupyter Widget" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "[ 0. 0.8307 0.83635 0.7126 ] \n", "[ 1. 0.74295 0.73682 0.74189] \n", "[ 2. 0.66492 0.69554 0.75996] \n", "[ 3. 0.62392 0.67166 0.7625 ] \n", "[ 4. 0.73479 0.80425 0.72861] \n", "[ 5. 0.65423 0.68876 0.76318] \n", "[ 6. 0.58608 0.64105 0.77783] \n", "[ 7. 0.55738 0.62641 0.78721] \n", "[ 8. 0.66163 0.74154 0.7501 ] \n", "[ 9. 0.59444 0.64253 0.78106] \n", "[ 10. 0.53 0.61772 0.79385] \n", "[ 11. 0.49747 0.65968 0.77832] \n", "[ 12. 0.59463 0.67915 0.77422] \n", "[ 13. 0.55023 0.65815 0.78106] \n", "[ 14. 0.48959 0.59035 0.80273] \n", "[ 15. 0.4459 0.61823 0.79336] \n", "[ 16. 0.55848 0.64115 0.78018] \n", "[ 17. 0.50268 0.61795 0.79541] \n", "[ 18. 0.45084 0.57577 0.80654] \n", "[ 19. 0.40726 0.5708 0.80947] \n", "[ 20. 0.51177 0.66771 0.78232] \n", "[ 21. 0.46516 0.6116 0.79932] \n", "[ 22. 0.40966 0.56865 0.81172] \n", "[ 23. 0.3852 0.58161 0.80967] \n", "[ 24. 0.48268 0.59944 0.79551] \n", "[ 25. 0.43282 0.56429 0.81182] \n", "[ 26. 0.37634 0.54724 0.81797] \n", "[ 27. 0.34953 0.54169 0.82129] \n", "[ 28. 0.46053 0.58128 0.80342] \n", "[ 29. 0.4041 0.55185 0.82295] \n", "[ 30. 0.3599 0.53953 0.82861] \n", "[ 31. 0.32937 0.55605 0.82227] \n", "\n", "CPU times: user 22min 52s, sys: 8min 58s, total: 31min 51s\n", "Wall time: 16min 38s\n" ] } ], "source": [ "%time learn.fit(1e-2, 8, cycle_len=4, wds=wd)" ] }, { "cell_type": "markdown", "metadata": { "heading_collapsed": true }, "source": [ "## Resnet 2" ] }, { "cell_type": "code", "execution_count": 63, "metadata": { "collapsed": true, "hidden": true }, "outputs": [], "source": [ "class Resnet2(nn.Module):\n", " def __init__(self, layers, c, p=0.5):\n", " super().__init__()\n", " self.conv1 = BnLayer(3, 16, stride=1, kernel_size=7)\n", " self.layers = nn.ModuleList([BnLayer(layers[i], layers[i+1])\n", " for i in range(len(layers) - 1)])\n", " self.layers2 = nn.ModuleList([ResnetLayer(layers[i+1], layers[i + 1], 1)\n", " for i in range(len(layers) - 1)])\n", " self.layers3 = nn.ModuleList([ResnetLayer(layers[i+1], layers[i + 1], 1)\n", " for i in range(len(layers) - 1)])\n", " self.out = nn.Linear(layers[-1], c)\n", " self.drop = nn.Dropout(p)\n", " \n", " def forward(self, x):\n", " x = self.conv1(x)\n", " for l,l2,l3 in zip(self.layers, self.layers2, self.layers3):\n", " x = l3(l2(l(x)))\n", " x = F.adaptive_max_pool2d(x, 1)\n", " x = x.view(x.size(0), -1)\n", " x = self.drop(x)\n", " return F.log_softmax(self.out(x), dim=-1)" ] }, { "cell_type": "code", "execution_count": 70, "metadata": { "collapsed": true, "hidden": true }, "outputs": [], "source": [ "learn = ConvLearner.from_model_data(Resnet2([16, 32, 64, 128, 256], 10, 0.2), data)" ] }, { "cell_type": "code", "execution_count": 71, "metadata": { "collapsed": true, "hidden": true }, "outputs": [], "source": [ "wd=1e-6" ] }, { "cell_type": "code", "execution_count": 72, "metadata": { "hidden": true, "scrolled": false }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "989b720e9a8542baa1e925ebd8473a93", "version_major": 2, "version_minor": 0 }, "text/plain": [ "A Jupyter Widget" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "[ 0. 1.7051 1.53364 0.46885] \n", "[ 1. 1.47858 1.34297 0.52734] \n", "\n", "CPU times: user 1min 29s, sys: 35.4 s, total: 2min 4s\n", "Wall time: 1min 6s\n" ] } ], "source": [ "%time learn.fit(1e-2, 2, wds=wd)" ] }, { "cell_type": "code", "execution_count": 73, "metadata": { "hidden": true }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "d338e700ad424bb283ebf7980e70f827", "version_major": 2, "version_minor": 0 }, "text/plain": [ "A Jupyter Widget" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "[ 0. 1.29414 1.26694 0.57041] \n", "[ 1. 1.21206 1.06634 0.62373] \n", "[ 2. 1.05583 1.0129 0.64258] \n", "[ 3. 1.09763 1.11568 0.61318] \n", "[ 4. 0.97597 0.93726 0.67266] \n", "[ 5. 0.86295 0.82655 0.71426] \n", "[ 6. 0.827 0.8655 0.70244] \n", "\n", "CPU times: user 5min 11s, sys: 1min 58s, total: 7min 9s\n", "Wall time: 3min 48s\n" ] } ], "source": [ "%time learn.fit(1e-2, 3, cycle_len=1, cycle_mult=2, wds=wd)" ] }, { "cell_type": "code", "execution_count": 74, "metadata": { "hidden": true }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "37ae7f5e5d6b475aab2c0c4438140f00", "version_major": 2, "version_minor": 0 }, "text/plain": [ "A Jupyter Widget" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "[ 0. 0.92043 0.93876 0.67685] \n", "[ 1. 0.8359 0.81156 0.72168] \n", "[ 2. 0.73084 0.72091 0.74463] \n", "[ 3. 0.68688 0.71326 0.74824] \n", "[ 4. 0.81046 0.79485 0.72354] \n", "[ 5. 0.72155 0.68833 0.76006] \n", "[ 6. 0.63801 0.68419 0.76855] \n", "[ 7. 0.59678 0.64972 0.77363] \n", "[ 8. 0.71126 0.78098 0.73828] \n", "[ 9. 0.63549 0.65685 0.7708 ] \n", "[ 10. 0.56837 0.63656 0.78057] \n", "[ 11. 0.52093 0.59159 0.79629] \n", "[ 12. 0.66463 0.69927 0.76357] \n", "[ 13. 0.58121 0.64529 0.77871] \n", "[ 14. 0.52346 0.5751 0.80293] \n", "[ 15. 0.47279 0.55094 0.80498] \n", "[ 16. 0.59857 0.64519 0.77559] \n", "[ 17. 0.54384 0.68057 0.77676] \n", "[ 18. 0.48369 0.5821 0.80273] \n", "[ 19. 0.43456 0.54708 0.81182] \n", "[ 20. 0.54963 0.65753 0.78203] \n", "[ 21. 0.49259 0.55957 0.80791] \n", "[ 22. 0.43646 0.55221 0.81309] \n", "[ 23. 0.39269 0.55158 0.81426] \n", "[ 24. 0.51039 0.61335 0.7998 ] \n", "[ 25. 0.4667 0.56516 0.80869] \n", "[ 26. 0.39469 0.5823 0.81299] \n", "[ 27. 0.36389 0.51266 0.82764] \n", "[ 28. 0.48962 0.55353 0.81201] \n", "[ 29. 0.4328 0.55394 0.81328] \n", "[ 30. 0.37081 0.50348 0.83359] \n", "[ 31. 0.34045 0.52052 0.82949] \n", "\n", "CPU times: user 23min 30s, sys: 9min 1s, total: 32min 32s\n", "Wall time: 17min 16s\n" ] } ], "source": [ "%time learn.fit(1e-2, 8, cycle_len=4, wds=wd)" ] }, { "cell_type": "code", "execution_count": 75, "metadata": { "collapsed": true, "hidden": true }, "outputs": [], "source": [ "learn.save('tmp3')" ] }, { "cell_type": "code", "execution_count": 76, "metadata": { "hidden": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " \r" ] } ], "source": [ "log_preds,y = learn.TTA()\n", "preds = np.mean(np.exp(log_preds),0)" ] }, { "cell_type": "code", "execution_count": 77, "metadata": { "hidden": true }, "outputs": [ { "data": { "text/plain": [ "(0.44507397166057938, 0.84909999999999997)" ] }, "execution_count": 77, "metadata": {}, "output_type": "execute_result" } ], "source": [ "metrics.log_loss(y,preds), accuracy_np(preds,y)" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true, "hidden": true }, "source": [ "### End" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true, "hidden": true }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "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.4" }, "toc": { "colors": { "hover_highlight": "#DAA520", "navigate_num": "#000000", "navigate_text": "#333333", "running_highlight": "#FF0000", "selected_highlight": "#FFD700", "sidebar_border": "#EEEEEE", "wrapper_background": "#FFFFFF" }, "moveMenuLeft": true, "nav_menu": { "height": "266px", "width": "252px" }, "navigate_menu": true, "number_sections": true, "sideBar": true, "threshold": 4, "toc_cell": false, "toc_section_display": "block", "toc_window_display": false, "widenNotebook": false } }, "nbformat": 4, "nbformat_minor": 2 }