{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%matplotlib inline\n", "%reload_ext autoreload\n", "%autoreload 2" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from fastai.conv_learner import *\n", "from fastai.dataset import *\n", "from fastai.models.resnet import vgg_resnet50\n", "\n", "import json" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "torch.cuda.set_device(2)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "torch.backends.cudnn.benchmark=True" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Data" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "PATH = Path('data/carvana')\n", "MASKS_FN = 'train_masks.csv'\n", "META_FN = 'metadata.csv'\n", "masks_csv = pd.read_csv(PATH/MASKS_FN)\n", "meta_csv = pd.read_csv(PATH/META_FN)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "def show_img(im, figsize=None, ax=None, alpha=None):\n", " if not ax: fig,ax = plt.subplots(figsize=figsize)\n", " ax.imshow(im, alpha=alpha)\n", " ax.set_axis_off()\n", " return ax" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "TRAIN_DN = 'train-128'\n", "MASKS_DN = 'train_masks-128'\n", "sz = 128\n", "bs = 64\n", "nw = 16" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "TRAIN_DN = 'train'\n", "MASKS_DN = 'train_masks_png'\n", "sz = 128\n", "bs = 64\n", "nw = 16" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "class MatchedFilesDataset(FilesDataset):\n", " def __init__(self, fnames, y, transform, path):\n", " self.y=y\n", " assert(len(fnames)==len(y))\n", " super().__init__(fnames, transform, path)\n", " def get_y(self, i): return open_image(os.path.join(self.path, self.y[i]))\n", " def get_c(self): return 0" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "x_names = np.array([Path(TRAIN_DN)/o for o in masks_csv['img']])\n", "y_names = np.array([Path(MASKS_DN)/f'{o[:-4]}_mask.png' for o in masks_csv['img']])" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "val_idxs = list(range(1008))\n", "((val_x,trn_x),(val_y,trn_y)) = split_by_idx(val_idxs, x_names, y_names)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "aug_tfms = [RandomRotate(4, tfm_y=TfmType.CLASS),\n", " RandomFlip(tfm_y=TfmType.CLASS),\n", " RandomLighting(0.05, 0.05, tfm_y=TfmType.CLASS)]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "tfms = tfms_from_model(resnet34, sz, crop_type=CropType.NO, tfm_y=TfmType.CLASS, aug_tfms=aug_tfms)\n", "datasets = ImageData.get_ds(MatchedFilesDataset, (trn_x,trn_y), (val_x,val_y), tfms, path=PATH)\n", "md = ImageData(PATH, datasets, bs, num_workers=16, classes=None)\n", "denorm = md.trn_ds.denorm" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "x,y = next(iter(md.trn_dl))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(torch.Size([64, 3, 128, 128]), torch.Size([64, 128, 128]))" ] }, "execution_count": null, "metadata": {}, "output_type": "execute_result" } ], "source": [ "x.shape,y.shape" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Simple upsample" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "f = resnet34\n", "cut,lr_cut = model_meta[f]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "def get_base():\n", " layers = cut_model(f(True), cut)\n", " return nn.Sequential(*layers)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "def dice(pred, targs):\n", " pred = (pred>0).float()\n", " return 2. * (pred*targs).sum() / (pred+targs).sum()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "class StdUpsample(nn.Module):\n", " def __init__(self, nin, nout):\n", " super().__init__()\n", " self.conv = nn.ConvTranspose2d(nin, nout, 2, stride=2)\n", " self.bn = nn.BatchNorm2d(nout)\n", " \n", " def forward(self, x): return self.bn(F.relu(self.conv(x)))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "class Upsample34(nn.Module):\n", " def __init__(self, rn):\n", " super().__init__()\n", " self.rn = rn\n", " self.features = nn.Sequential(\n", " rn, nn.ReLU(),\n", " StdUpsample(512,256),\n", " StdUpsample(256,256),\n", " StdUpsample(256,256),\n", " StdUpsample(256,256),\n", " nn.ConvTranspose2d(256, 1, 2, stride=2))\n", " \n", " def forward(self,x): return self.features(x)[:,0]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "class UpsampleModel():\n", " def __init__(self,model,name='upsample'):\n", " self.model,self.name = model,name\n", "\n", " def get_layer_groups(self, precompute):\n", " lgs = list(split_by_idxs(children(self.model.rn), [lr_cut]))\n", " return lgs + [children(self.model.features)[1:]]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "m_base = get_base()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "m = to_gpu(Upsample34(m_base))\n", "models = UpsampleModel(m)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "learn = ConvLearner(md, models)\n", "learn.opt_fn=optim.Adam\n", "learn.crit=nn.BCEWithLogitsLoss()\n", "learn.metrics=[accuracy_thresh(0.5),dice]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "learn.freeze_to(1)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "e4667e9fa899453da7cbf0a0524fb426", "version_major": 2, "version_minor": 0 }, "text/html": [ "

Failed to display Jupyter Widget of type HBox.

\n", "

\n", " If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean\n", " that the widgets JavaScript is still loading. If this message persists, it\n", " likely means that the widgets JavaScript library is either not installed or\n", " not enabled. See the Jupyter\n", " Widgets Documentation for setup instructions.\n", "

\n", "

\n", " If you're reading this message in another frontend (for example, a static\n", " rendering on GitHub or NBViewer),\n", " it may mean that your frontend doesn't currently support widgets.\n", "

\n" ], "text/plain": [ "HBox(children=(IntProgress(value=0, description='Epoch', max=1), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " 86%|█████████████████████████████████████████████████████████████ | 55/64 [00:22<00:03, 2.46it/s, loss=3.21]" ] }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEOCAYAAAB4nTvgAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4wLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvFvnyVgAAIABJREFUeJzt3Xl4VOXd//H3NxthSQiBsIUlrLIosoRdFGtVXArWDVApiIhoqVufPg/t09/TltZqW9u6K4uiWBEUl6IgiDs7BJA1bIYtrGHfCUnu3x8z1hhDMkAmZybzeV3XXJlzn/vMfOcQ5pOz3cecc4iIiJQkyusCREQk9CksRESkVAoLEREplcJCRERKpbAQEZFSKSxERKRUQQ0LM+tjZuvNbJOZjSpm/j/N7Gv/Y4OZHSo0b7CZbfQ/BgezThERKZkF6zoLM4sGNgBXA9nAEmCgc27tWfr/AujgnBtqZslABpAOOGAp0Mk5dzAoxYqISImCuWXRBdjknMtyzuUCk4F+JfQfCLzpf34tMNs5d8AfELOBPkGsVUREShDMsEgFtheazva3/YCZNQaaAJ+dy7JmNtzMMvyP4W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ZDYwBFgGHA1ju98DbZjYH2Feo/QPgp98e4AYeBNL9B4TXUszd15xz6/DdCjWh6Dz/8nf718Mg4CF/+8PAo2a2GN9urOJqvgRYbGZfA/8L/Mk5lwv0B541sxXAbHxbBS8Ag81sIb4v/uPFvN54YC2wzH867Ri+24q7EphezDJSAWiIchHAzKo5546Z777Li4Gezrnd5VzDI8BR59z4APtXAU4655yZDcB3sLtfUIssuZ6vgH7OuYNe1SDBo2MWIj4fmlkSvgPVfyzvoPB7EbjtHPp3wndA2oBD+M6U8oSZpeA7fqOgqKC0ZSEiIqXSMQsRESmVwkJEREqlsBARkVIpLEREpFQKCxERKdX/B8JmHe9veFf/AAAAAElFTkSuQmCC\n", "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "learn.lr_find()\n", "learn.sched.plot()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "lr=4e-2\n", "wd=1e-7\n", "lrs = np.array([lr/100,lr/10,lr])/2" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "0dfb71a3eb494433bd0f58647124a177", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(IntProgress(value=0, description='Epoch', max=4), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " 0%| | 0/64 [00:00 dice \n", " 0 0.216882 0.133512 0.938017 0.855221 \n", " 1 0.169544 0.115158 0.946518 0.878381 \n", " 2 0.153114 0.099104 0.957748 0.903353 \n", " 3 0.144105 0.093337 0.964404 0.915084 \n", "\n" ] }, { "data": { "text/plain": [ "[0.09333742126112893, 0.9644036065964472, 0.9150839788573129]" ] }, "execution_count": null, "metadata": {}, "output_type": "execute_result" } ], "source": [ "learn.fit(lr,1, wds=wd, cycle_len=4,use_clr=(20,8))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "learn.save('tmp')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "learn.load('tmp')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "learn.unfreeze()\n", "learn.bn_freeze(True)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "f8176783850a4cf48c3ba20494fac24e", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(IntProgress(value=0, description='Epoch', max=4), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "epoch trn_loss val_loss dice \n", " 0 0.174897 0.061603 0.976321 0.94382 \n", " 1 0.122911 0.053625 0.982206 0.957624 \n", " 2 0.106837 0.046653 0.985577 0.965792 \n", " 3 0.099075 0.042291 0.986519 0.968925 \n", "\n" ] }, { "data": { "text/plain": [ "[0.042291240323157536, 0.986519161670927, 0.9689251193924556]" ] }, "execution_count": null, "metadata": {}, "output_type": "execute_result" } ], "source": [ "learn.fit(lrs,1,cycle_len=4,use_clr=(20,8))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "learn.save('128')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "x,y = next(iter(md.val_dl))\n", "py = to_np(learn.model(V(x)))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQUAAAD8CAYAAAB+fLH0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAABA5JREFUeJzt3dtt02AAhuG06hSZIkugTMCUTFCxRKfoGISrSH0L6dGJf9vPc4ki4V709edD4O50Ou0Azu7nPgBgLKIAhCgAIQp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ACEKQIgCEKIAhCgAIQpAiAIQogCEKAAhCkCIAhCiAIQoACEKQIgCEKIAhCgAIQpAiAIQogCEKAAhCkCIAhCiAIQoACEKQIgCEKIAhCgAcXc6neY+BmAglgIQogCEKAAhCkCIAhCiAIQoACEKQIgCEKIAhCgAIQpAiAIQogCEKAAhCkCIAhCiAIQoACEKQIgCEKIAhCgA8RefEJKlJ3LAMQAAAABJRU5ErkJggg==\n", "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "show_img(py[0]>0);" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQUAAAD8CAYAAAB+fLH0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAABA5JREFUeJzt3dFN22AARtFQMQVTsETFBJ2yE6AuwRSM0fQJNbdqCAE79m+f81hVyCDl+rOdwN3xeDwAvPm29AEA6yIKQIgCEKIAhCgAIQpAiAIQogCEKABxv/QBHA6Hw/dvP7ytEmb26/fPu4/8P0sBCFEAQhSAEAUgRAEIUQBCFIAQBSBEAQhRAEIUgBAFIEQBCFEAQhSAEAUgRAEIUQBCFIAQBSBEAQhRAEIUgBAFIEQBCFEAQhSAEAUgRAEIUQBCFIAQBSBEAQhRAEIUgBAFIEQBCFEAQhSAEAUgRAEIUQBCFIAQBSBEAQhRAEIUgBAFIEQBCFEAQhSAEAUgRAEIUQBCFIAQBSBEAQhRAEIUgBAFIEQBCFEAQhSAEAUgRAEIUQBCFIAQBSBEAQhRAEIUgBAFIEQBCFEAQhSAEAUgRAGI+6UPgHV5fn2Z9es/PTzO+vX5OksBCEthR+ZeAVMeg0WxHEsBCFFglZ5fX1axbPZIFHZi1BfYqMc9MlEAQhSAEAUgPJLcuC1ck799Dx5T3oalAIQoMAyPKW/D5cNGefHwWZYCEKIAhCgAIQobs4ebcVv//pYmCkCIAhCiwJD2cJm0FFEAQhQ2xJmTKYgCEKIAhM8+DMBlwXX+/Xn5yPV1LAUgLAWGdvoLWM4tqtN/txousxSAsBRW7NK9hLeznnsOTEkUBiYGf/lZTMflAxCWwoqd3hRzJuRWLAUgLIVB/O9RmvVQHjdOw1IYlCAwF1EAQhTYDL94ZRqiAIQbjYNxJrzMH6T9GksBCEthEBbC9SyGz7EU2DxBvY4oACEKA3Cm45ZEAQhRAMLThxVz2TAdTyI+zlIAQhSAEAUgRIFd8UnKy0QBCFEAQhSAEAUgvHlphdwIY0mWAhCiAIQosEsu0c4TBSBEAQhRAEIUgPA+hRVx84s1sBSAEAUgRAEIUQBCFIAQBSBEAQhRAEIUgBAFIEQBCFEAQhSAEAUgRAEIUQBCFIAQBSBEAQhRAEIUgBAFIEQBCFEAQhSAEAUgRAEIUQBCFFbk6eHx8PTwuPRhsHOiAIQoACEKQIgCu+TezXmiAIQoACEKK+TRJEsSBSBEAQhRAEIUgLhf+gA47/Rm4/Pry4JHsh1u4F5mKQBhKQzivTOcFfE+6+A6lgIQlsIGzH0mXOMScfafjyhwkRfgvrh8AEIUgBAFIEQBCFEAQhSAEAUgRAEIUQBCFIAQBSBEAQhRAEIUgBAFIEQBCFEAQhSAEAUgRAEIUQBCFIAQBSBEAQhRAEIUgBAFIEQBCFEAQhSAuDsej0sfA7AilgIQogCEKAAhCkCIAhCiAIQoACEKQIgCEKIAhCgAIQpAiAIQogCEKAAhCkCIAhCiAIQoACEKQIgCEKIAhCgA8QfWQY8SR/FLYgAAAABJRU5ErkJggg==\n", "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "show_img(y[0]);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## U-net (ish)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "class SaveFeatures():\n", " features=None\n", " def __init__(self, m): self.hook = m.register_forward_hook(self.hook_fn)\n", " def hook_fn(self, module, input, output): self.features = output\n", " def remove(self): self.hook.remove()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "class UnetBlock(nn.Module):\n", " def __init__(self, up_in, x_in, n_out):\n", " super().__init__()\n", " up_out = x_out = n_out//2\n", " self.x_conv = nn.Conv2d(x_in, x_out, 1)\n", " self.tr_conv = nn.ConvTranspose2d(up_in, up_out, 2, stride=2)\n", " self.bn = nn.BatchNorm2d(n_out)\n", " \n", " def forward(self, up_p, x_p):\n", " up_p = self.tr_conv(up_p)\n", " x_p = self.x_conv(x_p)\n", " cat_p = torch.cat([up_p,x_p], dim=1)\n", " return self.bn(F.relu(cat_p))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "class Unet34(nn.Module):\n", " def __init__(self, rn):\n", " super().__init__()\n", " self.rn = rn\n", " self.sfs = [SaveFeatures(rn[i]) for i in [2,4,5,6]]\n", " self.up1 = UnetBlock(512,256,256)\n", " self.up2 = UnetBlock(256,128,256)\n", " self.up3 = UnetBlock(256,64,256)\n", " self.up4 = UnetBlock(256,64,256)\n", " self.up5 = nn.ConvTranspose2d(256, 1, 2, stride=2)\n", " \n", " def forward(self,x):\n", " x = F.relu(self.rn(x))\n", " x = self.up1(x, self.sfs[3].features)\n", " x = self.up2(x, self.sfs[2].features)\n", " x = self.up3(x, self.sfs[1].features)\n", " x = self.up4(x, self.sfs[0].features)\n", " x = self.up5(x)\n", " return x[:,0]\n", " \n", " def close(self):\n", " for sf in self.sfs: sf.remove()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "class UnetModel():\n", " def __init__(self,model,name='unet'):\n", " self.model,self.name = model,name\n", "\n", " def get_layer_groups(self, precompute):\n", " lgs = list(split_by_idxs(children(self.model.rn), [lr_cut]))\n", " return lgs + [children(self.model)[1:]]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "m_base = get_base()\n", "m = to_gpu(Unet34(m_base))\n", "models = UnetModel(m)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "learn = ConvLearner(md, models)\n", "learn.opt_fn=optim.Adam\n", "learn.crit=nn.BCEWithLogitsLoss()\n", "learn.metrics=[accuracy_thresh(0.5),dice]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "OrderedDict([('Conv2d-1',\n", " OrderedDict([('input_shape', [-1, 3, 128, 128]),\n", " ('output_shape', [-1, 64, 64, 64]),\n", " ('trainable', False),\n", " ('nb_params', 9408)])),\n", " ('BatchNorm2d-2',\n", " OrderedDict([('input_shape', [-1, 64, 64, 64]),\n", " ('output_shape', [-1, 64, 64, 64]),\n", " ('trainable', False),\n", " ('nb_params', 128)])),\n", " ('ReLU-3',\n", " OrderedDict([('input_shape', [-1, 64, 64, 64]),\n", " ('output_shape', [-1, 64, 64, 64]),\n", " ('nb_params', 0)])),\n", " ('MaxPool2d-4',\n", " OrderedDict([('input_shape', [-1, 64, 64, 64]),\n", " ('output_shape', [-1, 64, 32, 32]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-5',\n", " OrderedDict([('input_shape', [-1, 64, 32, 32]),\n", " ('output_shape', [-1, 64, 32, 32]),\n", " ('trainable', False),\n", " ('nb_params', 36864)])),\n", " ('BatchNorm2d-6',\n", " OrderedDict([('input_shape', [-1, 64, 32, 32]),\n", " ('output_shape', [-1, 64, 32, 32]),\n", " ('trainable', False),\n", " ('nb_params', 128)])),\n", " ('ReLU-7',\n", " OrderedDict([('input_shape', [-1, 64, 32, 32]),\n", " ('output_shape', [-1, 64, 32, 32]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-8',\n", " OrderedDict([('input_shape', [-1, 64, 32, 32]),\n", " ('output_shape', [-1, 64, 32, 32]),\n", " ('trainable', False),\n", " ('nb_params', 36864)])),\n", " ('BatchNorm2d-9',\n", " OrderedDict([('input_shape', [-1, 64, 32, 32]),\n", " ('output_shape', [-1, 64, 32, 32]),\n", " ('trainable', False),\n", " ('nb_params', 128)])),\n", " ('ReLU-10',\n", " OrderedDict([('input_shape', [-1, 64, 32, 32]),\n", " ('output_shape', [-1, 64, 32, 32]),\n", " ('nb_params', 0)])),\n", " ('BasicBlock-11',\n", " OrderedDict([('input_shape', [-1, 64, 32, 32]),\n", " ('output_shape', [-1, 64, 32, 32]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-12',\n", " OrderedDict([('input_shape', [-1, 64, 32, 32]),\n", " ('output_shape', [-1, 64, 32, 32]),\n", " ('trainable', False),\n", " ('nb_params', 36864)])),\n", " ('BatchNorm2d-13',\n", " OrderedDict([('input_shape', [-1, 64, 32, 32]),\n", " ('output_shape', [-1, 64, 32, 32]),\n", " ('trainable', False),\n", " ('nb_params', 128)])),\n", " ('ReLU-14',\n", " OrderedDict([('input_shape', [-1, 64, 32, 32]),\n", " ('output_shape', [-1, 64, 32, 32]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-15',\n", " OrderedDict([('input_shape', [-1, 64, 32, 32]),\n", " ('output_shape', [-1, 64, 32, 32]),\n", " ('trainable', False),\n", " ('nb_params', 36864)])),\n", " ('BatchNorm2d-16',\n", " OrderedDict([('input_shape', [-1, 64, 32, 32]),\n", " ('output_shape', [-1, 64, 32, 32]),\n", " ('trainable', False),\n", " ('nb_params', 128)])),\n", " ('ReLU-17',\n", " OrderedDict([('input_shape', [-1, 64, 32, 32]),\n", " ('output_shape', [-1, 64, 32, 32]),\n", " ('nb_params', 0)])),\n", " ('BasicBlock-18',\n", " OrderedDict([('input_shape', [-1, 64, 32, 32]),\n", " ('output_shape', [-1, 64, 32, 32]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-19',\n", " OrderedDict([('input_shape', [-1, 64, 32, 32]),\n", " ('output_shape', [-1, 64, 32, 32]),\n", " ('trainable', False),\n", " ('nb_params', 36864)])),\n", " ('BatchNorm2d-20',\n", " OrderedDict([('input_shape', [-1, 64, 32, 32]),\n", " ('output_shape', [-1, 64, 32, 32]),\n", " ('trainable', False),\n", " ('nb_params', 128)])),\n", " ('ReLU-21',\n", " OrderedDict([('input_shape', [-1, 64, 32, 32]),\n", " ('output_shape', [-1, 64, 32, 32]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-22',\n", " OrderedDict([('input_shape', [-1, 64, 32, 32]),\n", " ('output_shape', [-1, 64, 32, 32]),\n", " ('trainable', False),\n", " ('nb_params', 36864)])),\n", " ('BatchNorm2d-23',\n", " OrderedDict([('input_shape', [-1, 64, 32, 32]),\n", " ('output_shape', [-1, 64, 32, 32]),\n", " ('trainable', False),\n", " ('nb_params', 128)])),\n", " ('ReLU-24',\n", " OrderedDict([('input_shape', [-1, 64, 32, 32]),\n", " ('output_shape', [-1, 64, 32, 32]),\n", " ('nb_params', 0)])),\n", " ('BasicBlock-25',\n", " OrderedDict([('input_shape', [-1, 64, 32, 32]),\n", " ('output_shape', [-1, 64, 32, 32]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-26',\n", " OrderedDict([('input_shape', [-1, 64, 32, 32]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('trainable', False),\n", " ('nb_params', 73728)])),\n", " ('BatchNorm2d-27',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('trainable', False),\n", " ('nb_params', 256)])),\n", " ('ReLU-28',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-29',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('trainable', False),\n", " ('nb_params', 147456)])),\n", " ('BatchNorm2d-30',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('trainable', False),\n", " ('nb_params', 256)])),\n", " ('Conv2d-31',\n", " OrderedDict([('input_shape', [-1, 64, 32, 32]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('trainable', False),\n", " ('nb_params', 8192)])),\n", " ('BatchNorm2d-32',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('trainable', False),\n", " ('nb_params', 256)])),\n", " ('ReLU-33',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('nb_params', 0)])),\n", " ('BasicBlock-34',\n", " OrderedDict([('input_shape', [-1, 64, 32, 32]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-35',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('trainable', False),\n", " ('nb_params', 147456)])),\n", " ('BatchNorm2d-36',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('trainable', False),\n", " ('nb_params', 256)])),\n", " ('ReLU-37',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-38',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('trainable', False),\n", " ('nb_params', 147456)])),\n", " ('BatchNorm2d-39',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('trainable', False),\n", " ('nb_params', 256)])),\n", " ('ReLU-40',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('nb_params', 0)])),\n", " ('BasicBlock-41',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-42',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('trainable', False),\n", " ('nb_params', 147456)])),\n", " ('BatchNorm2d-43',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('trainable', False),\n", " ('nb_params', 256)])),\n", " ('ReLU-44',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-45',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('trainable', False),\n", " ('nb_params', 147456)])),\n", " ('BatchNorm2d-46',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('trainable', False),\n", " ('nb_params', 256)])),\n", " ('ReLU-47',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('nb_params', 0)])),\n", " ('BasicBlock-48',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-49',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('trainable', False),\n", " ('nb_params', 147456)])),\n", " ('BatchNorm2d-50',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('trainable', False),\n", " ('nb_params', 256)])),\n", " ('ReLU-51',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-52',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('trainable', False),\n", " ('nb_params', 147456)])),\n", " ('BatchNorm2d-53',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('trainable', False),\n", " ('nb_params', 256)])),\n", " ('ReLU-54',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('nb_params', 0)])),\n", " ('BasicBlock-55',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-56',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('trainable', False),\n", " ('nb_params', 294912)])),\n", " ('BatchNorm2d-57',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('trainable', False),\n", " ('nb_params', 512)])),\n", " ('ReLU-58',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-59',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('trainable', False),\n", " ('nb_params', 589824)])),\n", " ('BatchNorm2d-60',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('trainable', False),\n", " ('nb_params', 512)])),\n", " ('Conv2d-61',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('trainable', False),\n", " ('nb_params', 32768)])),\n", " ('BatchNorm2d-62',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('trainable', False),\n", " ('nb_params', 512)])),\n", " ('ReLU-63',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('nb_params', 0)])),\n", " ('BasicBlock-64',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-65',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('trainable', False),\n", " ('nb_params', 589824)])),\n", " ('BatchNorm2d-66',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('trainable', False),\n", " ('nb_params', 512)])),\n", " ('ReLU-67',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-68',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('trainable', False),\n", " ('nb_params', 589824)])),\n", " ('BatchNorm2d-69',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('trainable', False),\n", " ('nb_params', 512)])),\n", " ('ReLU-70',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('nb_params', 0)])),\n", " ('BasicBlock-71',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-72',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('trainable', False),\n", " ('nb_params', 589824)])),\n", " ('BatchNorm2d-73',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('trainable', False),\n", " ('nb_params', 512)])),\n", " ('ReLU-74',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-75',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('trainable', False),\n", " ('nb_params', 589824)])),\n", " ('BatchNorm2d-76',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('trainable', False),\n", " ('nb_params', 512)])),\n", " ('ReLU-77',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('nb_params', 0)])),\n", " ('BasicBlock-78',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-79',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('trainable', False),\n", " ('nb_params', 589824)])),\n", " ('BatchNorm2d-80',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('trainable', False),\n", " ('nb_params', 512)])),\n", " ('ReLU-81',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-82',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('trainable', False),\n", " ('nb_params', 589824)])),\n", " ('BatchNorm2d-83',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('trainable', False),\n", " ('nb_params', 512)])),\n", " ('ReLU-84',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('nb_params', 0)])),\n", " ('BasicBlock-85',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-86',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('trainable', False),\n", " ('nb_params', 589824)])),\n", " ('BatchNorm2d-87',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('trainable', False),\n", " ('nb_params', 512)])),\n", " ('ReLU-88',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-89',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('trainable', False),\n", " ('nb_params', 589824)])),\n", " ('BatchNorm2d-90',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('trainable', False),\n", " ('nb_params', 512)])),\n", " ('ReLU-91',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('nb_params', 0)])),\n", " ('BasicBlock-92',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-93',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('trainable', False),\n", " ('nb_params', 589824)])),\n", " ('BatchNorm2d-94',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('trainable', False),\n", " ('nb_params', 512)])),\n", " ('ReLU-95',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-96',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('trainable', False),\n", " ('nb_params', 589824)])),\n", " ('BatchNorm2d-97',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('trainable', False),\n", " ('nb_params', 512)])),\n", " ('ReLU-98',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('nb_params', 0)])),\n", " ('BasicBlock-99',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-100',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 512, 4, 4]),\n", " ('trainable', False),\n", " ('nb_params', 1179648)])),\n", " ('BatchNorm2d-101',\n", " OrderedDict([('input_shape', [-1, 512, 4, 4]),\n", " ('output_shape', [-1, 512, 4, 4]),\n", " ('trainable', False),\n", " ('nb_params', 1024)])),\n", " ('ReLU-102',\n", " OrderedDict([('input_shape', [-1, 512, 4, 4]),\n", " ('output_shape', [-1, 512, 4, 4]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-103',\n", " OrderedDict([('input_shape', [-1, 512, 4, 4]),\n", " ('output_shape', [-1, 512, 4, 4]),\n", " ('trainable', False),\n", " ('nb_params', 2359296)])),\n", " ('BatchNorm2d-104',\n", " OrderedDict([('input_shape', [-1, 512, 4, 4]),\n", " ('output_shape', [-1, 512, 4, 4]),\n", " ('trainable', False),\n", " ('nb_params', 1024)])),\n", " ('Conv2d-105',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 512, 4, 4]),\n", " ('trainable', False),\n", " ('nb_params', 131072)])),\n", " ('BatchNorm2d-106',\n", " OrderedDict([('input_shape', [-1, 512, 4, 4]),\n", " ('output_shape', [-1, 512, 4, 4]),\n", " ('trainable', False),\n", " ('nb_params', 1024)])),\n", " ('ReLU-107',\n", " OrderedDict([('input_shape', [-1, 512, 4, 4]),\n", " ('output_shape', [-1, 512, 4, 4]),\n", " ('nb_params', 0)])),\n", " ('BasicBlock-108',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 512, 4, 4]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-109',\n", " OrderedDict([('input_shape', [-1, 512, 4, 4]),\n", " ('output_shape', [-1, 512, 4, 4]),\n", " ('trainable', False),\n", " ('nb_params', 2359296)])),\n", " ('BatchNorm2d-110',\n", " OrderedDict([('input_shape', [-1, 512, 4, 4]),\n", " ('output_shape', [-1, 512, 4, 4]),\n", " ('trainable', False),\n", " ('nb_params', 1024)])),\n", " ('ReLU-111',\n", " OrderedDict([('input_shape', [-1, 512, 4, 4]),\n", " ('output_shape', [-1, 512, 4, 4]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-112',\n", " OrderedDict([('input_shape', [-1, 512, 4, 4]),\n", " ('output_shape', [-1, 512, 4, 4]),\n", " ('trainable', False),\n", " ('nb_params', 2359296)])),\n", " ('BatchNorm2d-113',\n", " OrderedDict([('input_shape', [-1, 512, 4, 4]),\n", " ('output_shape', [-1, 512, 4, 4]),\n", " ('trainable', False),\n", " ('nb_params', 1024)])),\n", " ('ReLU-114',\n", " OrderedDict([('input_shape', [-1, 512, 4, 4]),\n", " ('output_shape', [-1, 512, 4, 4]),\n", " ('nb_params', 0)])),\n", " ('BasicBlock-115',\n", " OrderedDict([('input_shape', [-1, 512, 4, 4]),\n", " ('output_shape', [-1, 512, 4, 4]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-116',\n", " OrderedDict([('input_shape', [-1, 512, 4, 4]),\n", " ('output_shape', [-1, 512, 4, 4]),\n", " ('trainable', False),\n", " ('nb_params', 2359296)])),\n", " ('BatchNorm2d-117',\n", " OrderedDict([('input_shape', [-1, 512, 4, 4]),\n", " ('output_shape', [-1, 512, 4, 4]),\n", " ('trainable', False),\n", " ('nb_params', 1024)])),\n", " ('ReLU-118',\n", " OrderedDict([('input_shape', [-1, 512, 4, 4]),\n", " ('output_shape', [-1, 512, 4, 4]),\n", " ('nb_params', 0)])),\n", " ('Conv2d-119',\n", " OrderedDict([('input_shape', [-1, 512, 4, 4]),\n", " ('output_shape', [-1, 512, 4, 4]),\n", " ('trainable', False),\n", " ('nb_params', 2359296)])),\n", " ('BatchNorm2d-120',\n", " OrderedDict([('input_shape', [-1, 512, 4, 4]),\n", " ('output_shape', [-1, 512, 4, 4]),\n", " ('trainable', False),\n", " ('nb_params', 1024)])),\n", " ('ReLU-121',\n", " OrderedDict([('input_shape', [-1, 512, 4, 4]),\n", " ('output_shape', [-1, 512, 4, 4]),\n", " ('nb_params', 0)])),\n", " ('BasicBlock-122',\n", " OrderedDict([('input_shape', [-1, 512, 4, 4]),\n", " ('output_shape', [-1, 512, 4, 4]),\n", " ('nb_params', 0)])),\n", " ('ConvTranspose2d-123',\n", " OrderedDict([('input_shape', [-1, 512, 4, 4]),\n", " ('output_shape', [-1, 128, 8, 8]),\n", " ('trainable', True),\n", " ('nb_params', 262272)])),\n", " ('Conv2d-124',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 128, 8, 8]),\n", " ('trainable', True),\n", " ('nb_params', 32896)])),\n", " ('BatchNorm2d-125',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('trainable', True),\n", " ('nb_params', 512)])),\n", " ('UnetBlock-126',\n", " OrderedDict([('input_shape', [-1, 512, 4, 4]),\n", " ('output_shape', [-1, 256, 8, 8]),\n", " ('nb_params', 0)])),\n", " ('ConvTranspose2d-127',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('trainable', True),\n", " ('nb_params', 131200)])),\n", " ('Conv2d-128',\n", " OrderedDict([('input_shape', [-1, 128, 16, 16]),\n", " ('output_shape', [-1, 128, 16, 16]),\n", " ('trainable', True),\n", " ('nb_params', 16512)])),\n", " ('BatchNorm2d-129',\n", " OrderedDict([('input_shape', [-1, 256, 16, 16]),\n", " ('output_shape', [-1, 256, 16, 16]),\n", " ('trainable', True),\n", " ('nb_params', 512)])),\n", " ('UnetBlock-130',\n", " OrderedDict([('input_shape', [-1, 256, 8, 8]),\n", " ('output_shape', [-1, 256, 16, 16]),\n", " ('nb_params', 0)])),\n", " ('ConvTranspose2d-131',\n", " OrderedDict([('input_shape', [-1, 256, 16, 16]),\n", " ('output_shape', [-1, 128, 32, 32]),\n", " ('trainable', True),\n", " ('nb_params', 131200)])),\n", " ('Conv2d-132',\n", " OrderedDict([('input_shape', [-1, 64, 32, 32]),\n", " ('output_shape', [-1, 128, 32, 32]),\n", " ('trainable', True),\n", " ('nb_params', 8320)])),\n", " ('BatchNorm2d-133',\n", " OrderedDict([('input_shape', [-1, 256, 32, 32]),\n", " ('output_shape', [-1, 256, 32, 32]),\n", " ('trainable', True),\n", " ('nb_params', 512)])),\n", " ('UnetBlock-134',\n", " OrderedDict([('input_shape', [-1, 256, 16, 16]),\n", " ('output_shape', [-1, 256, 32, 32]),\n", " ('nb_params', 0)])),\n", " ('ConvTranspose2d-135',\n", " OrderedDict([('input_shape', [-1, 256, 32, 32]),\n", " ('output_shape', [-1, 128, 64, 64]),\n", " ('trainable', True),\n", " ('nb_params', 131200)])),\n", " ('Conv2d-136',\n", " OrderedDict([('input_shape', [-1, 64, 64, 64]),\n", " ('output_shape', [-1, 128, 64, 64]),\n", " ('trainable', True),\n", " ('nb_params', 8320)])),\n", " ('BatchNorm2d-137',\n", " OrderedDict([('input_shape', [-1, 256, 64, 64]),\n", " ('output_shape', [-1, 256, 64, 64]),\n", " ('trainable', True),\n", " ('nb_params', 512)])),\n", " ('UnetBlock-138',\n", " OrderedDict([('input_shape', [-1, 256, 32, 32]),\n", " ('output_shape', [-1, 256, 64, 64]),\n", " ('nb_params', 0)])),\n", " ('ConvTranspose2d-139',\n", " OrderedDict([('input_shape', [-1, 256, 64, 64]),\n", " ('output_shape', [-1, 1, 128, 128]),\n", " ('trainable', True),\n", " ('nb_params', 1025)]))])" ] }, "execution_count": null, "metadata": {}, "output_type": "execute_result" } ], "source": [ "learn.summary()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[torch.Size([3, 64, 64, 64]),\n", " torch.Size([3, 64, 32, 32]),\n", " torch.Size([3, 128, 16, 16]),\n", " torch.Size([3, 256, 8, 8])]" ] }, "execution_count": null, "metadata": {}, "output_type": "execute_result" } ], "source": [ "[o.features.size() for o in m.sfs]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "learn.freeze_to(1)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "a2661ed6f2c049098c0b37f13ac2e03e", "version_major": 2, "version_minor": 0 }, "text/html": [ "

Failed to display Jupyter Widget of type HBox.

\n", "

\n", " If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean\n", " that the widgets JavaScript is still loading. If this message persists, it\n", " likely means that the widgets JavaScript library is either not installed or\n", " not enabled. See the Jupyter\n", " Widgets Documentation for setup instructions.\n", "

\n", "

\n", " If you're reading this message in another frontend (for example, a static\n", " rendering on GitHub or NBViewer),\n", " it may mean that your frontend doesn't currently support widgets.\n", "

\n" ], "text/plain": [ "HBox(children=(IntProgress(value=0, description='Epoch', max=1), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " 0%| | 0/64 [00:00" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "learn.lr_find()\n", "learn.sched.plot()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "lr=4e-2\n", "wd=1e-7\n", "\n", "lrs = np.array([lr/100,lr/10,lr])" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "dce9710ec3314546b8d1dfc8e1d250f6", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(IntProgress(value=0, description='Epoch', max=8), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "epoch trn_loss val_loss dice \n", " 0 0.12936 0.03934 0.988571 0.971385 \n", " 1 0.098401 0.039252 0.990438 0.974921 \n", " 2 0.087789 0.02539 0.990961 0.978927 \n", " 3 0.082625 0.027984 0.988483 0.975948 \n", " 4 0.079509 0.025003 0.99171 0.981221 \n", " 5 0.076984 0.022514 0.992462 0.981881 \n", " 6 0.076822 0.023203 0.992484 0.982321 \n", " 7 0.075488 0.021956 0.992327 0.982704 \n", "\n" ] }, { "data": { "text/plain": [ "[0.021955982234979434, 0.9923273126284281, 0.9827044502137199]" ] }, "execution_count": null, "metadata": {}, "output_type": "execute_result" } ], "source": [ "learn.fit(lr,1,wds=wd,cycle_len=8,use_clr=(5,8))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "learn.save('128urn-tmp')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "learn.load('128urn-tmp')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "learn.unfreeze()\n", "learn.bn_freeze(True)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "86aa94831fa840b7ae471989af971594", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(IntProgress(value=0, description='Epoch', max=20), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " 0%| | 0/64 [00:00 dice \n", " 0 0.073786 0.023418 0.99297 0.98283 \n", " 1 0.073561 0.020853 0.992142 0.982725 \n", " 2 0.075227 0.023357 0.991076 0.980879 \n", " 3 0.074245 0.02352 0.993108 0.983659 \n", " 4 0.073434 0.021508 0.993024 0.983609 \n", " 5 0.073092 0.020956 0.993188 0.983333 \n", " 6 0.073617 0.019666 0.993035 0.984102 \n", " 7 0.072786 0.019844 0.993196 0.98435 \n", " 8 0.072256 0.018479 0.993282 0.984277 \n", " 9 0.072052 0.019479 0.993164 0.984147 \n", " 10 0.071361 0.019402 0.993344 0.984541 \n", " 11 0.070969 0.018904 0.993139 0.984499 \n", " 12 0.071588 0.018027 0.9935 0.984543 \n", " 13 0.070709 0.018345 0.993491 0.98489 \n", " 14 0.072238 0.019096 0.993594 0.984825 \n", " 15 0.071407 0.018967 0.993446 0.984919 \n", " 16 0.071047 0.01966 0.993366 0.984952 \n", " 17 0.072024 0.018133 0.993505 0.98497 \n", " 18 0.071517 0.018464 0.993602 0.985192 \n", " 19 0.070109 0.018337 0.993614 0.9852 \n", "\n" ] }, { "data": { "text/plain": [ "[0.018336569653853538, 0.9936137114252362, 0.9852004420189631]" ] }, "execution_count": null, "metadata": {}, "output_type": "execute_result" } ], "source": [ "learn.fit(lrs/4, 1, wds=wd, cycle_len=20,use_clr=(20,10))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "learn.save('128urn-0')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "learn.load('128urn-0')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "x,y = next(iter(md.val_dl))\n", "py = to_np(learn.model(V(x)))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQUAAAD8CAYAAAB+fLH0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAABA5JREFUeJzt3dFN21AAhtFQMQVTsETFBJ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lM9dPmYZMVjO5QMQlsIk/j7TvXbmO/KCsAauw1IAwlLYmbfOlrOuCAtgXaJwIP64WMLlAxCiAIQoACEKQIgCEKIAhCgAIQpAiAIQogCEKAAhCkCIAhCiAIQoACEKQIgCEKIAhCgAIQpAiAIQogCEKAAhCkCIAhCiAIQoACEKQIgCEKIAxM35fN76GICBWApAiAIQogCEKAAhCkCIAhCiAIQoACEKQIgCEKIAhCgAIQpAiAIQogCEKAAhCkCIAhCiAIQoACEKQIgCEKIAxB8Zg4ZPO/0D6QAAAABJRU5ErkJggg==\n", "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "show_img(py[0]>0);" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQUAAAD8CAYAAAB+fLH0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAABA5JREFUeJzt3dFN22AARtFQMQVTsETFBJ2yE6AuwRSM0fQJNbdqCAE79m+f81hVyCDl+rOdwN3xeDwAvPm29AEA6yIKQIgCEKIAhCgAIQpAiAIQogCEKABxv/QBHA6Hw/dvP7ytEmb26/fPu4/8P0sBCFEAQhSAEAUgRAEIUQBCFIAQBSBEAQhRAEIUgBAFIEQBCFEAQhSAEAUgRAEIUQBCFIAQBSBEAQhRAEIUgBAFIEQBCFEAQhSAEAUgRAEIUQBCFIAQBSBEAQhRAEIUgBAFIEQBCFEAQhSAEAUgRAEIUQBCFIAQBSBEAQhRAEIUgBAFIEQBCFEAQhSAEAUgRAEIUQBCFIAQBSBEAQhRAEIUgBAFIEQBCFEAQhSAEAUgRAEIUQBCFIAQBSBEAQhRAEIUgBAFIEQBCFEAQhSAEAUgRAGI+6UPgHV5fn2Z9es/PTzO+vX5OksBCEthR+ZeAVMeg0WxHEsBCFFglZ5fX1axbPZIFHZi1BfYqMc9MlEAQhSAEAUgPJLcuC1ck799Dx5T3oalAIQoMAyPKW/D5cNGefHwWZYCEKIAhCgAIQobs4ebcVv//pYmCkCIAhCiwJD2cJm0FFEAQhQ2xJmTKYgCEKIAhM8+DMBlwXX+/Xn5yPV1LAUgLAWGdvoLWM4tqtN/txousxSAsBRW7NK9hLeznnsOTEkUBiYGf/lZTMflAxCWwoqd3hRzJuRWLAUgLIVB/O9RmvVQHjdOw1IYlCAwF1EAQhTYDL94ZRqiAIQbjYNxJrzMH6T9GksBCEthEBbC9SyGz7EU2DxBvY4oACEKA3Cm45ZEAQhRAMLThxVz2TAdTyI+zlIAQhSAEAUgRIFd8UnKy0QBCFEAQhSAEAUgvHlphdwIY0mWAhCiAIQosEsu0c4TBSBEAQhRAEIUgPA+hRVx84s1sBSAEAUgRAEIUQBCFIAQBSBEAQhRAEIUgBAFIEQBCFEAQhSAEAUgRAEIUQBCFIAQBSBEAQhRAEIUgBAFIEQBCFEAQhSAEAUgRAEIUQBCFFbk6eHx8PTwuPRhsHOiAIQoACEKQIgCu+TezXmiAIQoACEKK+TRJEsSBSBEAQhRAEIUgLhf+gA47/Rm4/Pry4JHsh1u4F5mKQBhKQzivTOcFfE+6+A6lgIQlsIGzH0mXOMScfafjyhwkRfgvrh8AEIUgBAFIEQBCFEAQhSAEAUgRAEIUQBCFIAQBSBEAQhRAEIUgBAFIEQBCFEAQhSAEAUgRAEIUQBCFIAQBSBEAQhRAEIUgBAFIEQBCFEAQhSAuDsej0sfA7AilgIQogCEKAAhCkCIAhCiAIQoACEKQIgCEKIAhCgAIQpAiAIQogCEKAAhCkCIAhCiAIQoACEKQIgCEKIAhCgA8QfWQY8SR/FLYgAAAABJRU5ErkJggg==\n", "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "show_img(y[0]);" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "m.close()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 512x512" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "sz=512\n", "bs=16" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "tfms = tfms_from_model(resnet34, sz, crop_type=CropType.NO, tfm_y=TfmType.CLASS, aug_tfms=aug_tfms)\n", "datasets = ImageData.get_ds(MatchedFilesDataset, (trn_x,trn_y), (val_x,val_y), tfms, path=PATH)\n", "md = ImageData(PATH, datasets, bs, num_workers=4, classes=None)\n", "denorm = md.trn_ds.denorm" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "m_base = get_base()\n", "m = to_gpu(Unet34(m_base))\n", "models = UnetModel(m)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "learn = ConvLearner(md, models)\n", "learn.opt_fn=optim.Adam\n", "learn.crit=nn.BCEWithLogitsLoss()\n", "learn.metrics=[accuracy_thresh(0.5),dice]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "learn.freeze_to(1)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "learn.load('128urn-0')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "2cd9f452b7dc40b58895f0ca5b876936", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(IntProgress(value=0, description='Epoch', max=5), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "epoch trn_loss val_loss dice \n", " 0 0.071421 0.02362 0.996459 0.991772 \n", " 1 0.070373 0.014013 0.996558 0.992602 \n", " 2 0.067895 0.011482 0.996705 0.992883 \n", " 3 0.070653 0.014256 0.996695 0.992771 \n", " 4 0.068621 0.013195 0.996993 0.993359 \n", "\n" ] }, { "data": { "text/plain": [ "[0.013194938530288046, 0.996993034604996, 0.993358936574724]" ] }, "execution_count": null, "metadata": {}, "output_type": "execute_result" } ], "source": [ "learn.fit(lr,1,wds=wd, cycle_len=5,use_clr=(5,5))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "learn.save('512urn-tmp')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "learn.unfreeze()\n", "learn.bn_freeze(True)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "learn.load('512urn-tmp')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "8768382fe1fe4b8e94e6647899e20575", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(IntProgress(value=0, description='Epoch', max=8), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "epoch trn_loss val_loss dice \n", " 0 0.06605 0.013602 0.997 0.993014 \n", " 1 0.066885 0.011252 0.997248 0.993563 \n", " 2 0.065796 0.009802 0.997223 0.993817 \n", " 3 0.065089 0.009668 0.997296 0.993744 \n", " 4 0.064552 0.011683 0.997269 0.993835 \n", " 5 0.065089 0.010553 0.997415 0.993827 \n", " 6 0.064303 0.009472 0.997431 0.994046 \n", " 7 0.062506 0.009623 0.997441 0.994118 \n", "\n" ] }, { "data": { "text/plain": [ "[0.009623114736602894, 0.9974409020136273, 0.9941179137381296]" ] }, "execution_count": null, "metadata": {}, "output_type": "execute_result" } ], "source": [ "learn.fit(lrs/4,1,wds=wd, cycle_len=8,use_clr=(20,8))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "learn.save('512urn')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "learn.load('512urn')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "x,y = next(iter(md.val_dl))\n", "py = to_np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LMf3N0G4kTAwjY8REIXbecawQaYFvpswbIwo/J5zcz/CwFTE4T6EYUNc9DyKMDAdAf06YdgIFzuPJAwbIArX8zmSrxEGpiYOtxGGwbmwWYMwDEwUWIswMD2BvZ4wACEMQAjDoIy/9+V8XkcYgBAGIIQBCGFgNzxnuJwwACEMA7KzsTZhYFdE9zLCAIQwDMaOxgiEAQhhAEIYgBAGdsdznM8JAxDCAIQwACEMQAgDEMIAhDAAIQxACAMQwgCEMAAhDAPxHn5GIQxACAMQwjCQ18PL2kuAZVmEAfgFYQBCGIAQBiCEAQhhAEIYgBAGIIQBCGEAQhiAEAYghAEIYRiIL2phFMIwEB+7ZhTCMBATA6MQhoGYGBiFMAAhDEAIA7vjT7bPCQMQwjAYuxkjEAYghIFdMZFdRhiAEIYB2dVYmzAAIQyDMjWwJmEYmDjcl/N5uee1F8D/O7+YffrydqJwHWHYkEsubvH4jxB8jTBM5rMbYqZwuPm/jzDszKg3089gvR5eluP727Dr3AthYAjnIRCF9fmvBBDCAIQwACEMQAgDEMIAhDAAIQxACAMQwgCEMAAhDEAIAxDCAIQwACEMQAgDEMIAhDAAIQxACAMQwgCEMAAhDEAIAxDCAIQwACEMQAgDEMIAxNPpdFp7DcBgTAxACAMQwgCEMAAhDEAIAxDCAIQwACEMQAgDEMIAhDAAIQxACAMQwgCEMAAhDEAIAxDCAIQwACEMQAgDEMIAxL+fjtP4pEiy4gAAAABJRU5ErkJggg==\n", "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "show_img(py[0]>0);" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQYAAAD8CAYAAACVSwr3AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAABF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IAhDAAIQxACAMQwgCEMAAhDEAIA6f0/eu3o5cwNGEAQhiAEAYghGEg3vcyCmEAQhiAEAYghAEIYRiMDyD3Z48/JgxACAMQwgCEMAzIe+D92NvrCAMQwjAoNxtHEoaBicO27Of1no5eAO97+zA/v74cuJK5icJthGEi7z3colFicD9hWMQth2DViAjBdoThhBwgPuLDRyCEAQhhAEIYgBAGIIQBCGEAQhiAEAYghAEIYQBCGIAQBiCEAQhhAEIYgBAGIIQBCGEAQhiAEAYghAEIYQBCGIAQBiCEAQhhAEIYgBAGIIQBCGEA4vFyuRy9BmAwJgYghAEIYQBCGIAQBiCEAQhhAEIYgBAGIIQBCGEAQhiAEAYghAEIYQBCGIAQBiCEAQhhAEIYgBAGIIQBCGEA4m/jpL5hSyL6CwAAAABJRU5ErkJggg==\n", "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "show_img(y[0]);" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "m.close()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1024x1024" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "sz=1024\n", "bs=4" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "tfms = tfms_from_model(resnet34, sz, crop_type=CropType.NO, tfm_y=TfmType.CLASS)\n", "datasets = ImageData.get_ds(MatchedFilesDataset, (trn_x,trn_y), (val_x,val_y), tfms, path=PATH)\n", "md = ImageData(PATH, datasets, bs, num_workers=16, classes=None)\n", "denorm = md.trn_ds.denorm" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "m_base = get_base()\n", "m = to_gpu(Unet34(m_base))\n", "models = UnetModel(m)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "learn = ConvLearner(md, models)\n", "learn.opt_fn=optim.Adam\n", "learn.crit=nn.BCEWithLogitsLoss()\n", "learn.metrics=[accuracy_thresh(0.5),dice]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "learn.load('512urn')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "learn.freeze_to(1)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "a864769b63b7438fa112cf68e2835a0e", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(IntProgress(value=0, description='Epoch', max=2), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "epoch trn_loss val_loss dice \n", " 0 0.007656 0.008155 0.997247 0.99353 \n", " 1 0.004706 0.00509 0.998039 0.995437 \n", "\n" ] }, { "data": { "text/plain": [ "[0.005090427414942828, 0.9980387706605215, 0.995437301104031]" ] }, "execution_count": null, "metadata": {}, "output_type": "execute_result" } ], "source": [ "learn.fit(lr,1, wds=wd, cycle_len=2,use_clr=(5,4))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "learn.save('1024urn-tmp')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "learn.load('1024urn-tmp')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "learn.unfreeze()\n", "learn.bn_freeze(True)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "lrs = np.array([lr/200,lr/30,lr])" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(IntProgress(value=0, description='Epoch', max=4), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "epoch trn_loss val_loss dice \n", " 0 0.005688 0.006135 0.997616 0.994616 \n", " 1 0.004412 0.005223 0.997983 0.995349 \n", " 2 0.004186 0.004975 0.99806 0.99554 \n", " 3 0.004016 0.004899 0.99812 0.995627 \n", "\n" ] }, { "data": { "text/plain": [ "[0.004898778487196458, 0.9981196409180051, 0.9956271404784823]" ] }, "execution_count": null, "metadata": {}, "output_type": "execute_result" } ], "source": [ "learn.fit(lrs/10,1, wds=wd,cycle_len=4,use_clr=(20,8))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "6ba1a0b69230449da669623edfd3f6c1", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(IntProgress(value=0, description='Epoch', max=4), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "epoch trn_loss val_loss dice \n", " 0 0.004169 0.004962 0.998049 0.995517 \n", " 1 0.004022 0.004595 0.99823 0.995818 \n", " 2 0.003772 0.004497 0.998215 0.995916 \n", " 3 0.003618 0.004435 0.998291 0.995991 \n", "\n" ] }, { "data": { "text/plain": [ "[0.004434524739663753, 0.9982911745707194, 0.9959913929776539]" ] }, "execution_count": null, "metadata": {}, "output_type": "execute_result" } ], "source": [ "learn.fit(lrs/10,1, wds=wd,cycle_len=4,use_clr=(20,8))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAD8CAYAAABpcuN4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJztnXl8FOX9xz/fPbJJOCUEBAKE+74UEbwFDxAq1nqg1Z9WW63V2tZahXrUixa1VVurba1irTfVahEUL0TBg0vlBgmXcoebBHLs7vP7Y+aZfWZ2ZnZ2s5tNst/364XOzjwz8+wkeb7zvUkIAYZhGIZxwpftC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jzXAFgeBrn8jI000QttLeSa1OZB4BroDnQygD8KANzel6/53IAM2FeCO/Q57QOwLhM/HwBnAJNlV8O4Gv933kN4Fk5zStrzwvAYABf6fdeCeBu5fd+kf69/wMgpO/P1z+X6ce7J5prmuc1V39WKwG8gFhkVL38DJVrnoGYoMjqs7L7x5nZDMMwjCu56qNgGIZhPMKCgmEYhnGFBQXDMAzjCgsKhmEYxhUWFAzDMIwrLCgYhmEYV1hQMAzDMK6woGAYhmFc+X99JBjOVeFOIwAAAABJRU5ErkJggg==\n", "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "learn.sched.plot_loss()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "learn.save('1024urn')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "learn.load('1024urn')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "x,y = next(iter(md.val_dl))\n", "py = to_np(learn.model(V(x)))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQ8AAAD8CAYAAABpXiE9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAABIlJREFUeJzt3dFN21AYgNGAmIIpWKJigk7ZCVCXYArGaPpQkBBQCF/s2Nc+5z3K1VX+z9chJFfH4/EA8F3XSy8AGJN4AIl4AIl4AIl4AIl4AIl4AIl4AIl4AMnN0gv4zI/rnz7+CjP7/efXVXmckweQiAeQiAeQiAeQiAeQiAeQiAeQiAeQiAeQiAeQiAeQiAeQiAeQiAeQiAeQiAeQiAeQiAeQiAeQiAeQiAeQiAeQiAeQiAeQiAeQiAeQiAeQiAeQiAeQiAeQiAeQiAeQiAeQiAe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JOIBJOIBJOIBJOIBJOIBJOIBJOIBJOIBJOIBJOIBJOIBJOIBJOIBJOIBJOIBJOIBJOIBJOIBJOIBJOIBJOIBJOIBJOIBJFfH43HpNQADcvIAEvEAEvEAEvEAEvEAEvEAEvEAEvEAEvEAEvEAEvEAEvEAEvEAEvEAEvEAEvEAEvEAEvEAEvEAEvEAEvEAEvEAEvEAkr87r79YklPCmgAAAABJRU5ErkJggg==\n", "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "show_img(py[0]>0);" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQ8AAAD8CAYAAABpXiE9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAABIRJREFUeJzt3NFRE0EAgOHgUAVV0IRDBVZpBYxNUAVlGB/QGRVR8+eOu937vkdmCJud23/3kpCb8/l8ArjUh60HAIxJPIBEPIBEPIBEPIBEPIBEPIBEPIBEPIDkdusB/M3HD598/BVW9uXr55vye04eQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQCIeQHK79QDYv8fnp9Ue++HufrXHZl3iwel0WjcQS/xdkdkfty1sFo5LjDDGoxGPgxtpUY401iMQD4YiIPshHgc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" } ], "source": [ "show_img(y[0]);" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" } }, "nbformat": 4, "nbformat_minor": 2 }