2021-04-10 12:20:26 +01:00
|
|
|
{
|
|
|
|
"cells": [
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2021-04-27 23:46:23 +01:00
|
|
|
"execution_count": 51,
|
2021-04-12 16:06:52 +01:00
|
|
|
"id": "682fef9a",
|
2021-04-10 12:20:26 +01:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"import numpy as np\n",
|
|
|
|
"import matplotlib as mpl\n",
|
2021-04-27 23:46:23 +01:00
|
|
|
"from matplotlib import pyplot as plt\n",
|
|
|
|
"import seaborn as sns\n",
|
|
|
|
"\n",
|
|
|
|
"fig_dpi = 200\n",
|
|
|
|
"lw = 3"
|
2021-04-10 12:20:26 +01:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
2021-04-12 16:06:52 +01:00
|
|
|
"id": "75cc3c1d",
|
2021-04-10 12:20:26 +01:00
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"# Dense Layers\n",
|
|
|
|
"\n",
|
|
|
|
"Exponential LR Decay: 0.98\n",
|
|
|
|
"\n",
|
|
|
|
"100 Epochs\n",
|
|
|
|
"\n",
|
|
|
|
"## Index\n",
|
|
|
|
"0. fc layers\n",
|
|
|
|
"1. nodes per layer\n",
|
|
|
|
"2. top-1 accuracy\n",
|
|
|
|
"3. top-5 accuracy\n",
|
|
|
|
"4. last val loss\n",
|
|
|
|
"5. last val accuracy"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2021-04-27 23:46:23 +01:00
|
|
|
"execution_count": 52,
|
2021-04-12 16:06:52 +01:00
|
|
|
"id": "85cb4e35",
|
2021-04-10 12:20:26 +01:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"fc_results = np.array([\n",
|
2021-04-10 16:56:01 +01:00
|
|
|
" [1, 256, 52.44, 79.86, 2.49, 57.66],\n",
|
2021-04-10 12:20:26 +01:00
|
|
|
" [1, 512, 49.29, 73.93, 2.95, 53.25],\n",
|
|
|
|
" [1, 1024, 40.7, 68.38, 3.66, 45.22],\n",
|
|
|
|
" [1, 2048, 32.12, 58.93, 4.66, 35.72],\n",
|
|
|
|
" [1, 4096, 24.03, 46.76, 5.61, 27.94],\n",
|
|
|
|
" [1, 8192, 19.70, 41.01, 6.42, 23.96],\n",
|
|
|
|
" \n",
|
2021-04-10 16:56:01 +01:00
|
|
|
" [2, 256, 54.48, 81.22, 1.86, 57.11],\n",
|
2021-04-10 12:20:26 +01:00
|
|
|
" [2, 512, 56.64, 82.46, 1.94, 60.23],\n",
|
|
|
|
" [2, 1024, 56.39, 81.53, 2.08, 60.91],\n",
|
|
|
|
" [2, 2048, 51.39, 79.00, 2.38, 56.74],\n",
|
|
|
|
" [2, 4096, 44.41, 71.83, 3.04, 47.61], # DEFAULT ALEXNET\n",
|
|
|
|
" [2, 8192, 37.74, 64.36, 3.60, 42.40],\n",
|
|
|
|
" \n",
|
2021-04-27 23:46:23 +01:00
|
|
|
" [3, 256, 0.80, 2.10, 5.29, 0.55],\n",
|
2021-04-10 12:20:26 +01:00
|
|
|
" [3, 512, 30.7, 65.16, 2.57, 30.82],\n",
|
|
|
|
" [3, 1024, 48.36, 76.65, 2.30, 49.88],\n",
|
|
|
|
" [3, 2048, 54.11, 80.48, 2.38, 58.21],\n",
|
|
|
|
" [3, 4096, 54.48, 82.09, 2.39, 57.17],\n",
|
|
|
|
" [3, 8192, 50.71, 78.57, 2.55, 55.88],\n",
|
|
|
|
" \n",
|
2021-04-27 23:46:23 +01:00
|
|
|
" [4, 256, 0.80, 2.29, 5.29, 0.55],\n",
|
|
|
|
" [4, 512, 0.80, 2.10, 5.29, 0.55],\n",
|
|
|
|
" [4, 1024, 0.80, 2.10, 5.29, 0.55],\n",
|
2021-04-10 12:20:26 +01:00
|
|
|
" [4, 2048, 25.45, 60.9, 2.84, 28.55],\n",
|
|
|
|
" [4, 4096, 41.14, 73.81, 2.81, 46.32],\n",
|
|
|
|
" [4, 8192, 49.85, 77.58, 2.97, 53.92]\n",
|
|
|
|
"])\n",
|
|
|
|
"\n",
|
|
|
|
"fc_0_results = [0, 196, 28.91, 54.05, 6.52, 33.21]\n",
|
|
|
|
"\n",
|
|
|
|
"layers = [1, 2, 3, 4]\n",
|
2021-04-10 16:56:01 +01:00
|
|
|
"nodes = [256, 512, 1024, 2048, 4096, 8192]\n",
|
2021-04-10 12:20:26 +01:00
|
|
|
"\n",
|
2021-04-10 16:56:01 +01:00
|
|
|
"fc_matrix = np.zeros((len(layers), len(nodes)))\n",
|
2021-04-10 12:20:26 +01:00
|
|
|
"for i in fc_results:\n",
|
|
|
|
" fc_matrix[layers.index(i[0]), nodes.index(i[1])] = i[2]"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2021-04-27 23:46:23 +01:00
|
|
|
"execution_count": 53,
|
2021-04-12 16:06:52 +01:00
|
|
|
"id": "0fd9f416",
|
2021-04-10 12:20:26 +01:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
{
|
2021-04-27 23:46:23 +01:00
|
|
|
"output_type": "display_data",
|
2021-04-10 12:20:26 +01:00
|
|
|
"data": {
|
2021-04-27 23:46:23 +01:00
|
|
|
"text/plain": "<Figure size 1200x800 with 2 Axes>",
|
|
|
|
"image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg height=\"275.704424pt\" version=\"1.1\" viewBox=\"0 0 322.010503 275.704424\" width=\"322.010503pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <metadata>\n <rdf:RDF xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n <cc:Work>\n <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n <dc:date>2021-04-27T23:35:59.316478</dc:date>\n <dc:format>image/svg+xml</dc:format>\n <dc:creator>\n <cc:Agent>\n <dc:title>Matplotlib v3.4.1, https://matplotlib.org/</dc:title>\n </cc:Agent>\n </dc:creator>\n </cc:Work>\n </rdf:RDF>\n </metadata>\n <defs>\n <style type=\"text/css\">*{stroke-linecap:butt;stroke-linejoin:round;}</style>\n </defs>\n <g id=\"figure_1\">\n <g id=\"patch_1\">\n <path d=\"M 0 275.704424 \nL 322.010503 275.704424 \nL 322.010503 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n </g>\n <g id=\"patch_2\">\n <path d=\"M 70.5522 239.758125 \nL 287.9922 239.758125 \nL 287.9922 22.318125 \nL 70.5522 22.318125 \nz\n\" style=\"fill:#ffffff;\"/>\n </g>\n <g id=\"pane3d_1\">\n <g id=\"patch_3\">\n <path d=\"M 92.669404 195.075752 \nL 143.748167 112.054079 \nL 141.604511 33.091819 \nL 87.225925 113.992856 \n\" style=\"fill:#f2f2f2;opacity:0.5;stroke:#f2f2f2;stroke-linejoin:miter;\"/>\n </g>\n </g>\n <g id=\"pane3d_2\">\n <g id=\"patch_4\">\n <path d=\"M 143.748167 112.054079 \nL 267.12988 140.711755 \nL 272.010591 60.930132 \nL 141.604511 33.091819 \n\" style=\"fill:#e6e6e6;opacity:0.5;stroke:#e6e6e6;stroke-linejoin:miter;\"/>\n </g>\n </g>\n <g id=\"pane3d_3\">\n <g id=\"patch_5\">\n <path d=\"M 92.669404 195.075752 \nL 225.306574 228.933476 \nL 267.12988 140.711755 \nL 143.748167 112.054079 \n\" style=\"fill:#ececec;opacity:0.5;stroke:#ececec;stroke-linejoin:miter;\"/>\n </g>\n </g>\n <g id=\"axis3d_1\">\n <g id=\"line2d_1\">\n <path d=\"M 92.669404 195.075752 \nL 225.306574 228.933476 \n\" style=\"fill:none;stroke:#000000;stroke-linecap:square;stroke-width:0.8;\"/>\n </g>\n <g id=\"text_1\">\n <!-- Fully Connected Layers -->\n <g transform=\"translate(89.967902 237.72124)rotate(-345.680153)scale(0.1 -0.1)\">\n <defs>\n <path d=\"M 628 4666 \nL 3309 4666 \nL 3309 4134 \nL 1259 4134 \nL 1259 2759 \nL 3109 2759 \nL 3109 2228 \nL 1259 2228 \nL 1259 0 \nL 628 0 \nL 628 4666 \nz\n\" id=\"DejaVuSans-46\" transform=\"scale(0.015625)\"/>\n <path d=\"M 544 1381 \nL 544 3500 \nL 1119 3500 \nL 1119 1403 \nQ 1119 906 1312 657 \nQ 1506 409 1894 409 \nQ 2359 409 2629 706 \nQ 2900 1003 2900 1516 \nL 2900 3500 \nL 3475 3500 \nL 3475 0 \nL 2900 0 \nL 2900 538 \nQ 2691 219 2414 64 \nQ 2138 -91 1772 -91 \nQ 1169 -91 856 284 \nQ 544 659 544 1381 \nz\nM 1991 3584 \nL 1991 3584 \nz\n\" id=\"DejaVuSans-75\" transform=\"scale(0.015625)\"/>\n <path d=\"M 603 4863 \nL 1178 4863 \nL 1178 0 \nL 603 0 \nL 603 4863 \nz\n\" id=\"DejaVuSans-6c\" transform=\"scale(0.015625)\"/>\n <path d=\"M 2059 -325 \nQ 1816 -950 1584 -1140 \nQ 1353 -1331 966 -1331 \nL 506 -1331 \nL 506 -850 \nL 844 -850 \nQ 1081 -850 1212 -737 \nQ 1344 -625 1503 -206 \nL 1606 56 \nL 191 3500 \nL 800 3500 \nL 1894 763 \nL 2988 3500 \nL 3597 3500 \nL 2059 -325 \nz\n\" id=\"DejaVuSans-79\" transform=\"scale(0.015625)\"/>\n <path id=\"DejaVuSans-20\" transform=\"scale(0.015625)\"/>\n <path d=\"M 4122 4306 \nL 4122 3641 \nQ 3803 3938 3442 4084 \nQ 3081 4231 2675 4231 \nQ 1875 4231 1450 3742 \nQ 1025 3253 1025 2328 \nQ 1025 1406 1450 917 \nQ 1875 428 2675 428 \nQ 3081 428 3442 575 \nQ 3803 722 4122 1019 \nL 4122 359 \nQ 3791 134 3420 21 \nQ 3050 -91 2638 -91 \nQ 1578 -91 968 557 \nQ 359 1206 359 2328 \nQ 359 3453 968 4101 \nQ 1578 4750 2638 4750 \nQ 3056 4750 3426 4639 \nQ 3797 4528 4122 4306 \nz\n\" id=\"DejaVuSans-43\" transform=\"s
|
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA38AAAL/CAYAAADWcH7jAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAB7CAAAewgFu0HU+AAEAAElEQVR4nOydd5hrV3W33yVNr7f3fm3famzjgk21Q3UohhAIJgE7kNAJJYSWgkmDQL6ExIReroHQQjcxobqBu31t3957nbll+qju7499jmZLozqjI2lG630ePaOyzz5bGumc89vrt9cSYwyKoiiKoiiKoijK9CZU7QEoiqIoiqIoiqIowaPiT1EURVEURVEUpQ5Q8acoiqIoiqIoilIHqPhTFEVRFEVRFEWpA1T8KYqiKIqiKIqi1AEq/hRFURRFURRFUeoAFX+KoiiKoiiKoih1gIo/RVEURVEURVGUOkDFn6IoiqIoiqIoSh2g4k9RFEVRFEVRFKUOUPGnKIqiKIqiKIpSB6j4UxRFURRFURRFqQNU/CmKoiiKoiiKotQBKv4URVEURVEURVHqABV/iqIoiqIoiqIodYCKP0VRFEVRFEVRlDpAxZ+iKIqiKIqiKEodoOJPURRFURRFURSlDlDxpyiKoiiKoiiKUgeo+FMURVEmhIhcKyLGu91VRPulIvJJEXlcRPpEJOlsf22W9leJyG0isldEhpy2JoC3oyhKlRGR2SLyERF5UETOiUjC+d3f7LVZ4Tx3sLojrm9E5Gbnf7Gp2uNRikPFn1IxROQb7sWbiHyg2mNSpjciclfGd67Y27XVHvtkEZGDed7fsIicEJFdInKniPyriNwoIvMCHM/TgCe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
|
|
|
"needs_background": "light"
|
2021-04-27 23:46:23 +01:00
|
|
|
}
|
2021-04-10 12:20:26 +01:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"X, Y = np.meshgrid(layers, nodes)\n",
|
|
|
|
"\n",
|
2021-04-27 23:46:23 +01:00
|
|
|
"fig = plt.figure(figsize=(6, 4))\n",
|
|
|
|
"# fig = plt.figure()\n",
|
|
|
|
"fig.set_dpi(fig_dpi)\n",
|
|
|
|
"\n",
|
2021-04-10 12:20:26 +01:00
|
|
|
"ax = plt.axes(projection='3d')\n",
|
|
|
|
"\n",
|
|
|
|
"surf = ax.plot_surface(X, Y, fc_matrix.T, cmap='viridis')\n",
|
|
|
|
"\n",
|
2021-04-27 23:46:23 +01:00
|
|
|
"ax.set_title('Accuracy For Different MLP Configurations')\n",
|
2021-04-10 12:20:26 +01:00
|
|
|
"ax.set_xlabel('Fully Connected Layers')\n",
|
|
|
|
"ax.set_ylabel('Nodes Per Layer')\n",
|
|
|
|
"ax.set_zlabel('Top-1 % Test Accuracy')\n",
|
2021-04-27 23:46:23 +01:00
|
|
|
"ax.set_xticks([1, 2, 3, 4])\n",
|
2021-04-10 12:20:26 +01:00
|
|
|
"\n",
|
2021-04-27 23:46:23 +01:00
|
|
|
"ax.view_init(40, -70)\n",
|
|
|
|
"fig.colorbar(surf, location=\"left\", shrink=0.7, aspect=15)\n",
|
|
|
|
"\n",
|
|
|
|
"# plt.tight_layout()\n",
|
|
|
|
"plt.savefig('fc-accuracy-surf.png')\n",
|
2021-04-10 12:20:26 +01:00
|
|
|
"\n",
|
|
|
|
"plt.show()"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2021-04-27 23:46:23 +01:00
|
|
|
"execution_count": 54,
|
2021-04-10 12:20:26 +01:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
{
|
2021-04-27 23:46:23 +01:00
|
|
|
"output_type": "display_data",
|
2021-04-10 12:20:26 +01:00
|
|
|
"data": {
|
2021-04-27 23:46:23 +01:00
|
|
|
"text/plain": "<Figure size 432x288 with 2 Axes>",
|
|
|
|
"image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg height=\"277.314375pt\" version=\"1.1\" viewBox=\"0 0 359.93325 277.314375\" width=\"359.93325pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <metadata>\n <rdf:RDF xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n <cc:Work>\n <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n <dc:date>2021-04-27T23:35:59.654666</dc:date>\n <dc:format>image/svg+xml</dc:format>\n <dc:creator>\n <cc:Agent>\n <dc:title>Matplotlib v3.4.1, https://matplotlib.org/</dc:title>\n </cc:Agent>\n </dc:creator>\n </cc:Work>\n </rdf:RDF>\n </metadata>\n <defs>\n <style type=\"text/css\">*{stroke-linecap:butt;stroke-linejoin:round;}</style>\n </defs>\n <g id=\"figure_1\">\n <g id=\"patch_1\">\n <path d=\"M 0 277.314375 \nL 359.93325 277.314375 \nL 359.93325 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n </g>\n <g id=\"axes_1\">\n <g id=\"patch_2\">\n <path d=\"M 37.55625 239.758125 \nL 305.39625 239.758125 \nL 305.39625 22.318125 \nL 37.55625 22.318125 \nz\n\" style=\"fill:#ffffff;\"/>\n </g>\n <g id=\"QuadMesh_1\">\n <path clip-path=\"url(#pa9501c0b26)\" d=\"M 37.55625 22.318125 \nL 104.51625 22.318125 \nL 104.51625 58.558125 \nL 37.55625 58.558125 \nL 37.55625 22.318125 \n\" style=\"fill:#f3e35a;\"/>\n <path clip-path=\"url(#pa9501c0b26)\" d=\"M 104.51625 22.318125 \nL 171.47625 22.318125 \nL 171.47625 58.558125 \nL 104.51625 58.558125 \nL 104.51625 22.318125 \n\" style=\"fill:#f2f482;\"/>\n <path clip-path=\"url(#pa9501c0b26)\" d=\"M 171.47625 22.318125 \nL 238.43625 22.318125 \nL 238.43625 58.558125 \nL 171.47625 58.558125 \nL 171.47625 22.318125 \n\" style=\"fill:#000004;\"/>\n <path clip-path=\"url(#pa9501c0b26)\" d=\"M 238.43625 22.318125 \nL 305.39625 22.318125 \nL 305.39625 58.558125 \nL 238.43625 58.558125 \nL 238.43625 22.318125 \n\" style=\"fill:#000004;\"/>\n <path clip-path=\"url(#pa9501c0b26)\" d=\"M 37.55625 58.558125 \nL 104.51625 58.558125 \nL 104.51625 94.798125 \nL 37.55625 94.798125 \nL 37.55625 58.558125 \n\" style=\"fill:#f9c72f;\"/>\n <path clip-path=\"url(#pa9501c0b26)\" d=\"M 104.51625 58.558125 \nL 171.47625 58.558125 \nL 171.47625 94.798125 \nL 104.51625 94.798125 \nL 104.51625 58.558125 \n\" style=\"fill:#fcffa4;\"/>\n <path clip-path=\"url(#pa9501c0b26)\" d=\"M 171.47625 58.558125 \nL 238.43625 58.558125 \nL 238.43625 94.798125 \nL 171.47625 94.798125 \nL 171.47625 58.558125 \n\" style=\"fill:#c83f4b;\"/>\n <path clip-path=\"url(#pa9501c0b26)\" d=\"M 238.43625 58.558125 \nL 305.39625 58.558125 \nL 305.39625 94.798125 \nL 238.43625 94.798125 \nL 238.43625 58.558125 \n\" style=\"fill:#000004;\"/>\n <path clip-path=\"url(#pa9501c0b26)\" d=\"M 37.55625 94.798125 \nL 104.51625 94.798125 \nL 104.51625 131.038125 \nL 37.55625 131.038125 \nL 37.55625 94.798125 \n\" style=\"fill:#f57d15;\"/>\n <path clip-path=\"url(#pa9501c0b26)\" d=\"M 104.51625 94.798125 \nL 171.47625 94.798125 \nL 171.47625 131.038125 \nL 104.51625 131.038125 \nL 104.51625 94.798125 \n\" style=\"fill:#fafda1;\"/>\n <path clip-path=\"url(#pa9501c0b26)\" d=\"M 171.47625 94.798125 \nL 238.43625 94.798125 \nL 238.43625 131.038125 \nL 171.47625 131.038125 \nL 171.47625 94.798125 \n\" style=\"fill:#fac026;\"/>\n <path clip-path=\"url(#pa9501c0b26)\" d=\"M 238.43625 94.798125 \nL 305.39625 94.798125 \nL 305.39625 131.038125 \nL 238.43625 131.038125 \nL 238.43625 94.798125 \n\" style=\"fill:#000004;\"/>\n <path clip-path=\"url(#pa9501c0b26)\" d=\"M 37.55625 131.038125 \nL 104.51625 131.038125 \nL 104.51625 167.278125 \nL 37.55625 167.278125 \nL 37.55625 131.038125 \n\" style=\"fill:#d04545;\"/>\n <path clip-path=\"url(#pa9501c0b26)\" d=\"M 104.51625 131.038125 \nL 171.47625 131.038125 \nL 171.47625 167.278125 \nL 104.51625 167.27812
|
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAWgAAAEWCAYAAABLzQ1kAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAAsTAAALEwEAmpwYAAApE0lEQVR4nO3deZxcVZ338c83MQhCIIQlAkHiICoqEiAiCsMqwsiuIAgIApKZeRRwB0YUeBwdXBBxRCVsIqAQdgRFkFV4DBBWgaAIJhBIAoQECHu6f88f5zSpNN1Vt7r7Vt3u/r7zuq9U3e2culX9q1O/e+65igjMzKx6RrS7AmZm1jMHaDOzinKANjOrKAdoM7OKcoA2M6soB2gzs4pygLa6JP2XpNNrnu8h6XFJiyRtJOk9ku6R9IKkw9tZ16FO0jhJN+djfWL396bdJP1S0rfaXY8hJSIG9QTcCCwA3truupT0+rYGOoFFNdPvBvDYvQK8ADwP3AkcVe9YAo8Au9U8PwM4qU3H5jjg3AbrzAReA1btNv9uIIAJ+f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ZoLwdoMzMgXehZLQ7QZmZAp1vQZmbV1NnZzIi8reEAbWYGRKdb0GZm1eQUh5lZNbkXh5lZVXW+3u4avIkDtJkZbkGbmVXXYvfiMDOrJregzcyqSe5mZ2ZWUQ7QZmYV5QBtZlZN6ni18UotVkqAlrQM8HrX/dAkbQNsDDwYEX8oo0wzs/6oYg66rGGn7wDGAEj6OvBdYDngK5L+p7eNJE2WNF3S9DPP+0dJVTMz60FnR/GpRcpKcYyMiAX58d7Av0bEy5JOAO4Cju5po4iYAkwB3/LKzFqsgi3osgL085I+EBH3A88AywIv5/J8o1ozqxy1sGV
|
2021-04-10 12:20:26 +01:00
|
|
|
},
|
|
|
|
"metadata": {
|
|
|
|
"needs_background": "light"
|
2021-04-27 23:46:23 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"fig = plt.figure()\n",
|
|
|
|
"# fig.set_dpi(fig_dpi)\n",
|
|
|
|
"\n",
|
|
|
|
"sns.heatmap(fc_matrix.T, xticklabels=layers, yticklabels=nodes, cmap='inferno')\n",
|
|
|
|
"\n",
|
|
|
|
"plt.title(\"Accuracy For Different MLP Configurations\")\n",
|
|
|
|
"plt.xlabel(\"Fully-Connected Layer\")\n",
|
|
|
|
"plt.ylabel(\"Nodes Per Layer\")\n",
|
|
|
|
"\n",
|
|
|
|
"# plt.tight_layout()\n",
|
|
|
|
"# plt.savefig('fc-accuracy-surf.png')\n",
|
|
|
|
"\n",
|
|
|
|
"plt.show()"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": 55,
|
|
|
|
"id": "dc9d04b1",
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"output_type": "display_data",
|
|
|
|
"data": {
|
|
|
|
"text/plain": "<Figure size 1000x800 with 1 Axes>",
|
|
|
|
"image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg height=\"279.754375pt\" version=\"1.1\" viewBox=\"0 0 352.343125 279.754375\" width=\"352.343125pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <metadata>\n <rdf:RDF xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n <cc:Work>\n <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n <dc:date>2021-04-27T23:36:00.046264</dc:date>\n <dc:format>image/svg+xml</dc:format>\n <dc:creator>\n <cc:Agent>\n <dc:title>Matplotlib v3.4.1, https://matplotlib.org/</dc:title>\n </cc:Agent>\n </dc:creator>\n </cc:Work>\n </rdf:RDF>\n </metadata>\n <defs>\n <style type=\"text/css\">*{stroke-linecap:butt;stroke-linejoin:round;}</style>\n </defs>\n <g id=\"figure_1\">\n <g id=\"patch_1\">\n <path d=\"M 0 279.754375 \nL 352.343125 279.754375 \nL 352.343125 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n </g>\n <g id=\"axes_1\">\n <g id=\"patch_2\">\n <path d=\"M 40.603125 242.198125 \nL 345.143125 242.198125 \nL 345.143125 22.318125 \nL 40.603125 22.318125 \nz\n\" style=\"fill:#ffffff;\"/>\n </g>\n <g id=\"matplotlib.axis_1\">\n <g id=\"xtick_1\">\n <g id=\"line2d_1\">\n <path clip-path=\"url(#p1d60529dc7)\" d=\"M 45.51506 242.198125 \nL 45.51506 22.318125 \n\" style=\"fill:none;stroke:#b0b0b0;stroke-linecap:square;stroke-width:0.8;\"/>\n </g>\n <g id=\"line2d_2\">\n <defs>\n <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"m03ae96e441\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n </defs>\n <g>\n <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"45.51506\" xlink:href=\"#m03ae96e441\" y=\"242.198125\"/>\n </g>\n </g>\n <g id=\"text_1\">\n <!-- 0 -->\n <g transform=\"translate(42.33381 256.796563)scale(0.1 -0.1)\">\n <defs>\n <path d=\"M 2034 4250 \nQ 1547 4250 1301 3770 \nQ 1056 3291 1056 2328 \nQ 1056 1369 1301 889 \nQ 1547 409 2034 409 \nQ 2525 409 2770 889 \nQ 3016 1369 3016 2328 \nQ 3016 3291 2770 3770 \nQ 2525 4250 2034 4250 \nz\nM 2034 4750 \nQ 2819 4750 3233 4129 \nQ 3647 3509 3647 2328 \nQ 3647 1150 3233 529 \nQ 2819 -91 2034 -91 \nQ 1250 -91 836 529 \nQ 422 1150 422 2328 \nQ 422 3509 836 4129 \nQ 1250 4750 2034 4750 \nz\n\" id=\"DejaVuSans-30\" transform=\"scale(0.015625)\"/>\n </defs>\n <use xlink:href=\"#DejaVuSans-30\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_2\">\n <g id=\"line2d_3\">\n <path clip-path=\"url(#p1d60529dc7)\" d=\"M 80.400966 242.198125 \nL 80.400966 22.318125 \n\" style=\"fill:none;stroke:#b0b0b0;stroke-linecap:square;stroke-width:0.8;\"/>\n </g>\n <g id=\"line2d_4\">\n <g>\n <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"80.400966\" xlink:href=\"#m03ae96e441\" y=\"242.198125\"/>\n </g>\n </g>\n <g id=\"text_2\">\n <!-- 1000 -->\n <g transform=\"translate(67.675966 256.796563)scale(0.1 -0.1)\">\n <defs>\n <path d=\"M 794 531 \nL 1825 531 \nL 1825 4091 \nL 703 3866 \nL 703 4441 \nL 1819 4666 \nL 2450 4666 \nL 2450 531 \nL 3481 531 \nL 3481 0 \nL 794 0 \nL 794 531 \nz\n\" id=\"DejaVuSans-31\" transform=\"scale(0.015625)\"/>\n </defs>\n <use xlink:href=\"#DejaVuSans-31\"/>\n <use x=\"63.623047\" xlink:href=\"#DejaVuSans-30\"/>\n <use x=\"127.246094\" xlink:href=\"#DejaVuSans-30\"/>\n <use x=\"190.869141\" xlink:href=\"#DejaVuSans-30\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_3\">\n <g id=\"line2d_5\">\n <path clip-path=\"url(#p1d60529dc7)\" d=\"M 115.286871 242.198125 \nL 115.286871 22.318125 \n\" style=\"fill:none;stroke:#b0b0b0;stroke-linecap:square;stroke-width:0.8;\"/>\n </g>\n <g id=\"line2d_6\">\n <g>\n <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"115.286871\" xlink:href=\"#m03ae9
|
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA9QAAAMMCAYAAACyue/GAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAB7CAAAewgFu0HU+AAEAAElEQVR4nOzdd3hjxfXw8e+o2JLretfbe+/eSlk6oYXQCYQWOoEkQCihpEN+bxo1lEACIQk9EHrvbensAuvtvXubve62bMvSvH+MbF1rZUnWqtk+n+eZxypz7x1V69yZOaO01gghhBBCCCGEEKJrbOlugBBCCCGEEEII0R1JQC2EEEIIIYQQQsRBAmohhBBCCCGEECIOElALIYQQQgghhBBxkIBaCCGEEEIIIYSIgwTUQgghhBBCCCFEHCSgFkIIIYQQQggh4iABtRBCCCGEEEIIEQcJqIUQQgghhBBCiDhIQC2EEEIIIYQQQsRBAmohhBBCCCGEECIOElALIYQQQgghhBBxkIBaCCGEEEIIIYSIgwTUQgghhBBCCCFEHCSgFkIIIYQQQggh4iABtRBCCCGEEEIIEQcJqIUQQgghhBBCiDhIQC2EEEIIIYQQQsRBAmohhBBCCCGEECIOElALIUQ3pJTqp5S6SSn1pVKqSinlU0rpQLkg3e0Te1JKbbS8RqPS3Z7OWNqo090WIUR6KaU+tHwnHJbu9giRiSSgFmIvK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TqpOwgz/PGGMPc5gE8s+2nEnFF1hqmbBZwAvBDmvlGWfWyM8TnZaNlmVAx1vJjlnn4EqJB62SHX/4wJwAs62a8KPBZrD9ZByXy+MT8C2s6s+4neIzX
|
2021-04-10 12:20:26 +01:00
|
|
|
},
|
2021-04-27 23:46:23 +01:00
|
|
|
"metadata": {
|
|
|
|
"needs_background": "light"
|
|
|
|
}
|
2021-04-10 12:20:26 +01:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
2021-04-27 23:46:23 +01:00
|
|
|
"fig = plt.figure(figsize=(5, 4))\n",
|
|
|
|
"fig.set_dpi(fig_dpi)\n",
|
|
|
|
"\n",
|
2021-04-10 12:20:26 +01:00
|
|
|
"# plt.plot([196], fc_0_results[2], 'x-', label=f'0 Layers')\n",
|
|
|
|
"\n",
|
|
|
|
"for i in layers:\n",
|
2021-04-27 23:46:23 +01:00
|
|
|
" plt.plot(nodes, fc_matrix[i-1, :], '-', label=f'{i} Layers', ms=8, lw=lw)\n",
|
|
|
|
"\n",
|
|
|
|
"plt.plot([4096], [fc_matrix[1, 4]], \"2\", label=\"AlexNet\", ms=\"8\", c=(0, 0, 0))\n",
|
|
|
|
"\n",
|
|
|
|
"# plt.annotate('Standard\\nAlexNet', \n",
|
|
|
|
"# (4096, fc_matrix[layers.index(2), nodes.index(4096)]),\n",
|
|
|
|
"# textcoords=\"offset points\",\n",
|
|
|
|
"# xytext=(40, 10),\n",
|
|
|
|
"# ha='center',\n",
|
|
|
|
"# arrowprops={'arrowstyle': 'simple'}\n",
|
|
|
|
"# )\n",
|
2021-04-10 12:20:26 +01:00
|
|
|
" \n",
|
2021-04-27 23:46:23 +01:00
|
|
|
"plt.title('Accuracy for Varied Dense Layer Shapes')\n",
|
2021-04-10 12:20:26 +01:00
|
|
|
"plt.xlabel('Nodes Per Layer')\n",
|
|
|
|
"plt.ylabel('Top-1 % Test Accuracy')\n",
|
|
|
|
"\n",
|
|
|
|
"plt.grid()\n",
|
|
|
|
"plt.legend()\n",
|
2021-04-27 23:46:23 +01:00
|
|
|
"\n",
|
|
|
|
"plt.tight_layout()\n",
|
|
|
|
"plt.savefig('fc-accuracy.png')\n",
|
|
|
|
"\n",
|
2021-04-10 12:20:26 +01:00
|
|
|
"plt.show()"
|
|
|
|
]
|
2021-04-12 16:06:52 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"id": "340c4eb8",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"# Convolutional Non-Linearity\n",
|
|
|
|
"\n",
|
|
|
|
"Exponential LR Decay: 0.98\n",
|
|
|
|
"\n",
|
|
|
|
"100 Epochs\n",
|
|
|
|
"\n",
|
|
|
|
"Taking conovlutional layers and distributing the standard number of filters into separate conv layers with ReLu nonlinearity\n",
|
|
|
|
"\n",
|
|
|
|
"## Index\n",
|
|
|
|
"0. convolutional layer\n",
|
|
|
|
"1. number of divisions\n",
|
|
|
|
"2. top-1 accuracy\n",
|
|
|
|
"3. top-5 accuracy\n",
|
|
|
|
"4. last val loss\n",
|
|
|
|
"5. last val accuracy"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2021-04-27 23:46:23 +01:00
|
|
|
"execution_count": 56,
|
2021-04-12 16:06:52 +01:00
|
|
|
"id": "3426107c",
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"conv_nonlin_results = np.array([\n",
|
|
|
|
"# [1, 1, 44.41, 71.83, 3.04, 47.61], # STANDARD ALEXNET\n",
|
|
|
|
"# [1, 2],\n",
|
|
|
|
"# [1, 4],\n",
|
|
|
|
" \n",
|
|
|
|
" [4, 1, 44.41, 71.83, 3.04, 47.61], # STANDARD ALEXNET\n",
|
|
|
|
" [4, 2, 42.31, 71.96, 3.07, 49.75],\n",
|
|
|
|
" [4, 4, 0.8, 2.47, 5.29, 0.55],\n",
|
|
|
|
" \n",
|
|
|
|
" [5, 1, 44.41, 71.83, 3.04, 47.61], # STANDARD ALEXNET\n",
|
|
|
|
" [5, 2, 46.08, 73.87, 3.00, 49.20],\n",
|
|
|
|
" [5, 4, 0.8, 2.47, 5.29, 0.55]\n",
|
|
|
|
"])\n",
|
|
|
|
"\n",
|
|
|
|
"nonlin_layers = [4, 5]\n",
|
|
|
|
"nonlin_div = [1, 2, 4]\n",
|
|
|
|
"\n",
|
|
|
|
"conv_nonlin_matrix = np.zeros((len(nonlin_layers), len(nonlin_div)))\n",
|
|
|
|
"for i in conv_nonlin_results:\n",
|
|
|
|
" conv_nonlin_matrix[nonlin_layers.index(i[0]), nonlin_div.index(i[1])] = i[2]"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2021-04-27 23:46:23 +01:00
|
|
|
"execution_count": 57,
|
2021-04-12 16:06:52 +01:00
|
|
|
"id": "d7457e0e",
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
{
|
2021-04-27 23:46:23 +01:00
|
|
|
"output_type": "display_data",
|
2021-04-12 16:06:52 +01:00
|
|
|
"data": {
|
2021-04-27 23:46:23 +01:00
|
|
|
"text/plain": "<Figure size 432x288 with 1 Axes>",
|
|
|
|
"image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg height=\"277.314375pt\" version=\"1.1\" viewBox=\"0 0 382.603125 277.314375\" width=\"382.603125pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <metadata>\n <rdf:RDF xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n <cc:Work>\n <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n <dc:date>2021-04-27T23:36:00.395911</dc:date>\n <dc:format>image/svg+xml</dc:format>\n <dc:creator>\n <cc:Agent>\n <dc:title>Matplotlib v3.4.1, https://matplotlib.org/</dc:title>\n </cc:Agent>\n </dc:creator>\n </cc:Work>\n </rdf:RDF>\n </metadata>\n <defs>\n <style type=\"text/css\">*{stroke-linecap:butt;stroke-linejoin:round;}</style>\n </defs>\n <g id=\"figure_1\">\n <g id=\"patch_1\">\n <path d=\"M 0 277.314375 \nL 382.603125 277.314375 \nL 382.603125 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n </g>\n <g id=\"axes_1\">\n <g id=\"patch_2\">\n <path d=\"M 40.603125 239.758125 \nL 375.403125 239.758125 \nL 375.403125 22.318125 \nL 40.603125 22.318125 \nz\n\" style=\"fill:#ffffff;\"/>\n </g>\n <g id=\"matplotlib.axis_1\">\n <g id=\"xtick_1\">\n <g id=\"line2d_1\">\n <path clip-path=\"url(#p7dfacff8d9)\" d=\"M 55.821307 239.758125 \nL 55.821307 22.318125 \n\" style=\"fill:none;stroke:#b0b0b0;stroke-linecap:square;stroke-width:0.8;\"/>\n </g>\n <g id=\"line2d_2\">\n <defs>\n <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"m3d62dd6f5e\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n </defs>\n <g>\n <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"55.821307\" xlink:href=\"#m3d62dd6f5e\" y=\"239.758125\"/>\n </g>\n </g>\n <g id=\"text_1\">\n <!-- 1.0 -->\n <g transform=\"translate(47.869744 254.356562)scale(0.1 -0.1)\">\n <defs>\n <path d=\"M 794 531 \nL 1825 531 \nL 1825 4091 \nL 703 3866 \nL 703 4441 \nL 1819 4666 \nL 2450 4666 \nL 2450 531 \nL 3481 531 \nL 3481 0 \nL 794 0 \nL 794 531 \nz\n\" id=\"DejaVuSans-31\" transform=\"scale(0.015625)\"/>\n <path d=\"M 684 794 \nL 1344 794 \nL 1344 0 \nL 684 0 \nL 684 794 \nz\n\" id=\"DejaVuSans-2e\" transform=\"scale(0.015625)\"/>\n <path d=\"M 2034 4250 \nQ 1547 4250 1301 3770 \nQ 1056 3291 1056 2328 \nQ 1056 1369 1301 889 \nQ 1547 409 2034 409 \nQ 2525 409 2770 889 \nQ 3016 1369 3016 2328 \nQ 3016 3291 2770 3770 \nQ 2525 4250 2034 4250 \nz\nM 2034 4750 \nQ 2819 4750 3233 4129 \nQ 3647 3509 3647 2328 \nQ 3647 1150 3233 529 \nQ 2819 -91 2034 -91 \nQ 1250 -91 836 529 \nQ 422 1150 422 2328 \nQ 422 3509 836 4129 \nQ 1250 4750 2034 4750 \nz\n\" id=\"DejaVuSans-30\" transform=\"scale(0.015625)\"/>\n </defs>\n <use xlink:href=\"#DejaVuSans-31\"/>\n <use x=\"63.623047\" xlink:href=\"#DejaVuSans-2e\"/>\n <use x=\"95.410156\" xlink:href=\"#DejaVuSans-30\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_2\">\n <g id=\"line2d_3\">\n <path clip-path=\"url(#p7dfacff8d9)\" d=\"M 106.54858 239.758125 \nL 106.54858 22.318125 \n\" style=\"fill:none;stroke:#b0b0b0;stroke-linecap:square;stroke-width:0.8;\"/>\n </g>\n <g id=\"line2d_4\">\n <g>\n <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"106.54858\" xlink:href=\"#m3d62dd6f5e\" y=\"239.758125\"/>\n </g>\n </g>\n <g id=\"text_2\">\n <!-- 1.5 -->\n <g transform=\"translate(98.597017 254.356562)scale(0.1 -0.1)\">\n <defs>\n <path d=\"M 691 4666 \nL 3169 4666 \nL 3169 4134 \nL 1269 4134 \nL 1269 2991 \nQ 1406 3038 1543 3061 \nQ 1681 3084 1819 3084 \nQ 2600 3084 3056 2656 \nQ 3513 2228 3513 1497 \nQ 3513 744 3044 326 \nQ 2575 -91 1722 -91 \nQ 1428 -91 1123 -41 \nQ 819 9 494 109 \nL 494 744 \nQ 775 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NpL6yLOX2x9vIdseqd92HVXd4HYIyZh3V1fyZWPfsXWPV3YCXhjlj1333tcVl5F+sumRPAGqxTT0f9seqG/8Sqq3w8bYSxLrIuAKqQg38oY93H3wHrCOck1j9lB4cqL2eX8zcQC5QAFjmMehrraDIO64c2JyfLxaoX3QmssU+5f8A6EsMYsxTrO1tmT7MsmxjnY223IVhHm0eBV4Ev7Uk+xToKWwnswboz45EcxLoI6+LoEWNd2E6Tk+W+gHUGeRorgV7egRhjLmDfSWJXTzRPV768bMtpWNUvB7HuTFvjxDwZMsbswSpvCYfBrwLrgM3A71gXj/PyQFh5rMTs+MrszDszmf5vkf1vMTvLsG6ZPiIijt//51hnPp/b29Nj5MoZqSrMRORFoKYxpl+2EyulPEJEdgEPGmN+8GQc7npwSLmQfTp6P9ZZgVKqABKRblj1/1menbqDVvUUciLyANaFy6XGmJWejkcpdS0RWYF1s8ND9jUGj9KqHqWUKmL0iF8ppYqYQlHHHxkZaSpXrpyrec+fP0+JEiWyn7AQ8JayeEs5QMtSUHlLWfJajvXr158wxkSlH14oEn/lypVZt25druZdsWIFrVu3zt+APMRbyuIt5QAtS0HlLWXJazlEJMMn2rWqRymlihhN/EopVcRo4ldKqSKmUNTxK6WKruTkZA4cOEBCQkL2E9vCwsLYtm2bC6NyD2fLERQURIUKFfD393dquZr4lVIF2oEDBwgJCaFy5co42xZbXFwcISGFvydIZ8phjOHkyZMcOHCAKlWqOLVcrepR7vHzu7An3YPFe1Zaw5XKQkJCAhEREU4n/aJGRIiIiMjRGZEmfuUe5RvBvEFXkv+eldbn8o08GZUqJDTpZy2n349W9SjXSLkECWfh4im4eBqSLkDDATCzF/WCa8Av+6D
|
2021-04-12 16:06:52 +01:00
|
|
|
},
|
|
|
|
"metadata": {
|
|
|
|
"needs_background": "light"
|
2021-04-27 23:46:23 +01:00
|
|
|
}
|
2021-04-12 16:06:52 +01:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"for idx, i in enumerate(nonlin_layers):\n",
|
|
|
|
" plt.plot(nonlin_div, conv_nonlin_matrix[idx, :], 'x-', label=f'Layer {i}')\n",
|
|
|
|
"\n",
|
|
|
|
"plt.title('Accuracy for Varied Convolutional Non-Linearity')\n",
|
|
|
|
"plt.xlabel('Layer Divisor')\n",
|
|
|
|
"plt.ylabel('Top-1 % Test Accuracy')\n",
|
|
|
|
"\n",
|
|
|
|
"plt.grid()\n",
|
|
|
|
"plt.legend()\n",
|
|
|
|
"plt.show()"
|
|
|
|
]
|
2021-04-25 19:56:49 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"source": [
|
|
|
|
"# Convolutional Kernel Size\n",
|
|
|
|
"\n",
|
|
|
|
"Exponential LR Decay: 0.98\n",
|
|
|
|
"\n",
|
|
|
|
"100 Epochs\n",
|
|
|
|
"\n",
|
|
|
|
"## Index\n",
|
|
|
|
"0. convolutional layer\n",
|
|
|
|
"1. kernel size\n",
|
|
|
|
"2. top-1 accuracy\n",
|
|
|
|
"3. top-5 accuracy\n",
|
|
|
|
"4. last val loss\n",
|
|
|
|
"5. last val accuracy"
|
|
|
|
],
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2021-04-27 23:46:23 +01:00
|
|
|
"execution_count": 58,
|
2021-04-25 19:56:49 +01:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"kernel_results = np.array([\n",
|
|
|
|
" [1, 3, 37.06, 64.73, 3.38, 44.36],\n",
|
2021-04-27 23:46:23 +01:00
|
|
|
" [1, 5, 43.73, 70.35, 3.19, 48.22],\n",
|
2021-04-25 19:56:49 +01:00
|
|
|
" [1, 7, 44.72, 71.16, 3.00, 48.96],\n",
|
|
|
|
" [1, 11, 44.41, 71.83, 3.04, 47.61], # DEFAULT ALEXNET\n",
|
|
|
|
" [1, 15, 43.17, 71.59, 3.09, 47.55],\n",
|
|
|
|
"\n",
|
|
|
|
" [2, 3, 41.63, 67.63, 3.24, 45.53],\n",
|
|
|
|
" [2, 5, 44.41, 71.83, 3.04, 47.61], # DEFAULT ALEXNET\n",
|
|
|
|
" [2, 7, 45.15, 72.21, 2.97, 50.49],\n",
|
|
|
|
" [2, 9, 43.61, 71.34, 3.10, 47.37],\n",
|
|
|
|
" [2, 11, 39.35, 65.6, 3.36, 44.98],\n",
|
|
|
|
"\n",
|
|
|
|
" [3, 3, 44.41, 71.83, 3.04, 47.61], # DEFAULT ALEXNET\n",
|
2021-04-27 23:46:23 +01:00
|
|
|
" [3, 5, 50.59, 75.91, 2.74, 53.80],\n",
|
|
|
|
" [3, 7, 47.13, 75.48, 3.19, 52.21],\n",
|
|
|
|
" [3, 9, 40.83, 69.73, 3.90, 47.00],\n",
|
|
|
|
" [3, 11, 33.29, 61.70, 5.27, 38.05],\n",
|
|
|
|
"\n",
|
|
|
|
" [4, 3, 44.41, 71.83, 3.04, 47.61], # DEFAULT ALEXNET\n",
|
|
|
|
" [4, 5, 48.67, 74.74, 2.92, 51.84],\n",
|
|
|
|
" [4, 7, 49.54, 76.34, 2.98, 52.63],\n",
|
|
|
|
" [4, 9, 47.19, 74.24, 3.40, 50.37],\n",
|
|
|
|
" [4, 11, 43.55, 70.29, 3.98, 47.24],\n",
|
|
|
|
"\n",
|
|
|
|
" [5, 3, 44.41, 71.83, 3.04, 47.61], # DEFAULT ALEXNET\n",
|
|
|
|
" [5, 5, 46.94, 74.31, 2.88, 51.53],\n",
|
|
|
|
" [5, 7, 48.24, 75.42, 2.87, 51.84],\n",
|
|
|
|
" [5, 9, 47.56, 74.68, 2.94, 53.43],\n",
|
|
|
|
" [5, 11, 44.1, 72.45, 3.60, 48.28],\n",
|
|
|
|
"])\n",
|
|
|
|
"\n",
|
|
|
|
"default_kernel_sizes = [11, 5, 3, 3, 3]\n",
|
|
|
|
"kernel_layers = {i[0] for i in kernel_results}"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": 59,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"output_type": "display_data",
|
|
|
|
"data": {
|
|
|
|
"text/plain": "<Figure size 1000x700 with 1 Axes>",
|
|
|
|
"image/svg+xml": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<svg height=\"243.754375pt\" version=\"1.1\" viewBox=\"0 0 352.34375 243.754375\" width=\"352.34375pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <metadata>\n <rdf:RDF xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n <cc:Work>\n <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n <dc:date>2021-04-27T23:36:00.835957</dc:date>\n <dc:format>image/svg+xml</dc:format>\n <dc:creator>\n <cc:Agent>\n <dc:title>Matplotlib v3.4.1, https://matplotlib.org/</dc:title>\n </cc:Agent>\n </dc:creator>\n </cc:Work>\n </rdf:RDF>\n </metadata>\n <defs>\n <style type=\"text/css\">*{stroke-linecap:butt;stroke-linejoin:round;}</style>\n </defs>\n <g id=\"figure_1\">\n <g id=\"patch_1\">\n <path d=\"M 0 243.754375 \nL 352.34375 243.754375 \nL 352.34375 0 \nL 0 0 \nz\n\" style=\"fill:none;\"/>\n </g>\n <g id=\"axes_1\">\n <g id=\"patch_2\">\n <path d=\"M 50.14375 206.198125 \nL 345.14375 206.198125 \nL 345.14375 22.318125 \nL 50.14375 22.318125 \nz\n\" style=\"fill:#ffffff;\"/>\n </g>\n <g id=\"matplotlib.axis_1\">\n <g id=\"xtick_1\">\n <g id=\"line2d_1\">\n <path clip-path=\"url(#pce67704def)\" d=\"M 85.901326 206.198125 \nL 85.901326 22.318125 \n\" style=\"fill:none;stroke:#b0b0b0;stroke-linecap:square;stroke-width:0.8;\"/>\n </g>\n <g id=\"line2d_2\">\n <defs>\n <path d=\"M 0 0 \nL 0 3.5 \n\" id=\"me142eee882\" style=\"stroke:#000000;stroke-width:0.8;\"/>\n </defs>\n <g>\n <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"85.901326\" xlink:href=\"#me142eee882\" y=\"206.198125\"/>\n </g>\n </g>\n <g id=\"text_1\">\n <!-- 4 -->\n <g transform=\"translate(82.720076 220.796562)scale(0.1 -0.1)\">\n <defs>\n <path d=\"M 2419 4116 \nL 825 1625 \nL 2419 1625 \nL 2419 4116 \nz\nM 2253 4666 \nL 3047 4666 \nL 3047 1625 \nL 3713 1625 \nL 3713 1100 \nL 3047 1100 \nL 3047 0 \nL 2419 0 \nL 2419 1100 \nL 313 1100 \nL 313 1709 \nL 2253 4666 \nz\n\" id=\"DejaVuSans-34\" transform=\"scale(0.015625)\"/>\n </defs>\n <use xlink:href=\"#DejaVuSans-34\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_2\">\n <g id=\"line2d_3\">\n <path clip-path=\"url(#pce67704def)\" d=\"M 130.598295 206.198125 \nL 130.598295 22.318125 \n\" style=\"fill:none;stroke:#b0b0b0;stroke-linecap:square;stroke-width:0.8;\"/>\n </g>\n <g id=\"line2d_4\">\n <g>\n <use style=\"stroke:#000000;stroke-width:0.8;\" x=\"130.598295\" xlink:href=\"#me142eee882\" y=\"206.198125\"/>\n </g>\n </g>\n <g id=\"text_2\">\n <!-- 6 -->\n <g transform=\"translate(127.417045 220.796562)scale(0.1 -0.1)\">\n <defs>\n <path d=\"M 2113 2584 \nQ 1688 2584 1439 2293 \nQ 1191 2003 1191 1497 \nQ 1191 994 1439 701 \nQ 1688 409 2113 409 \nQ 2538 409 2786 701 \nQ 3034 994 3034 1497 \nQ 3034 2003 2786 2293 \nQ 2538 2584 2113 2584 \nz\nM 3366 4563 \nL 3366 3988 \nQ 3128 4100 2886 4159 \nQ 2644 4219 2406 4219 \nQ 1781 4219 1451 3797 \nQ 1122 3375 1075 2522 \nQ 1259 2794 1537 2939 \nQ 1816 3084 2150 3084 \nQ 2853 3084 3261 2657 \nQ 3669 2231 3669 1497 \nQ 3669 778 3244 343 \nQ 2819 -91 2113 -91 \nQ 1303 -91 875 529 \nQ 447 1150 447 2328 \nQ 447 3434 972 4092 \nQ 1497 4750 2381 4750 \nQ 2619 4750 2861 4703 \nQ 3103 4656 3366 4563 \nz\n\" id=\"DejaVuSans-36\" transform=\"scale(0.015625)\"/>\n </defs>\n <use xlink:href=\"#DejaVuSans-36\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_3\">\n <g id=\"line2d_5\">\n <path clip-path=\"url(#pce67704def)\" d=\"M 175.295265 206.198125 \nL 175.295265 22.318125 \n\" style=\"fill:none;stroke:#b0b0b0;stroke-linecap:square;stroke-width:0.8;\"/>\n </g>\n <g id=\"line2d_6\">\n <g>\n <use
|
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA9QAAAKoCAYAAACWQ7eKAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAB7CAAAewgFu0HU+AAEAAElEQVR4nOzdd3QU1dvA8e9NTwhJSKOH0JuAKF0E7BXLT8WGiopdrGBFxYoIduzYK8WKr71QpCNNSugQenrv2fv+MRsyCUl2drO7ac/nnD3Zcu+du7uzk3nmNqW1RgghhBBCCCGEEM7xqesKCCGEEEIIIYQQDZEE1EIIIYQQQgghhAskoBZCCCGEEEIIIVwgAbUQQgghhBBCCOECCaiFEEIIIYQQQggXSEAthBBCCCGEEEK4QAJqIYQQQgghhBDCBRJQCyGEEEIIIYQQLpCAWgghhBBCCCGEcIEE1EIIIYQQQgghhAskoBZCCCGEEEIIIVw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L2Cw/fmuGK2gZ2utl1govg1GoN4aY39ZjBFERAOnYgxLAHhcKbVZG2O+j9JaFyql5gJla/BejbUJKyvMBVBVAqXUTOAO01M5GCeZh4FWGEMgQjGOX88rpVppre+1sG1vKTueXYzxOQN8h3Gsq8ylZQCVUhMxAtYyhRjHwkSMuShOwTjO+GL87uOUUpda3EefAB6331+H8VsqxhjzX7ZkVEfgO6XUCdroxVaV9hjHHY1xwWkrxnGkGGOW5f6U79tXAGFKqfPd/TtyhjImq/qd8lmgk4HTtdYbLObvifF/q2x9Y41xwXczxrGuLTACaI6xb/y
|
|
|
|
},
|
|
|
|
"metadata": {
|
|
|
|
"needs_background": "light"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"fig = plt.figure(figsize=(5, 3.5))\n",
|
|
|
|
"fig.set_dpi(fig_dpi)\n",
|
|
|
|
"\n",
|
|
|
|
"kernel_parsed_results = [(list(), list()) for _ in kernel_layers]\n",
|
|
|
|
"for row in kernel_results:\n",
|
|
|
|
" kernel_parsed_results[int(row[0]) - 1][0].append(row[2]) # top-1 accuracy\n",
|
|
|
|
" kernel_parsed_results[int(row[0]) - 1][1].append(row[1]) # kernel size (x value)\n",
|
|
|
|
"\n",
|
|
|
|
"for idx, l in enumerate(kernel_parsed_results):\n",
|
|
|
|
" plt.plot(l[1], l[0], '-', label=f'Layer {idx+1}', lw=lw)\n",
|
|
|
|
"\n",
|
|
|
|
"for idx, l in enumerate(kernel_parsed_results):\n",
|
|
|
|
" # print(l)\n",
|
|
|
|
" # print(l[0][l[1].index(default_kernel_sizes[idx])])\n",
|
|
|
|
"\n",
|
|
|
|
" if idx == len(kernel_parsed_results) - 1:\n",
|
|
|
|
" label = 'AlexNet'\n",
|
|
|
|
" else:\n",
|
|
|
|
" label = None\n",
|
|
|
|
" plt.plot([default_kernel_sizes[idx]], [l[0][l[1].index(default_kernel_sizes[idx])]], \"2\", label=label, ms=\"8\", c=(0, 0, 0))\n",
|
|
|
|
"\n",
|
|
|
|
"plt.title('Accuracy for Varied Convolutional Kernel Size')\n",
|
|
|
|
"plt.xlabel(\"Kernel Size\")\n",
|
|
|
|
"plt.ylabel('Top-1 % Test Accuracy')\n",
|
|
|
|
"\n",
|
|
|
|
"plt.grid()\n",
|
|
|
|
"plt.legend()\n",
|
|
|
|
"\n",
|
|
|
|
"plt.tight_layout()\n",
|
|
|
|
"plt.savefig('kernel-accuracy.png')\n",
|
|
|
|
"\n",
|
|
|
|
"plt.show()"
|
2021-04-25 19:56:49 +01:00
|
|
|
]
|
2021-04-27 23:46:23 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": []
|
2021-04-10 12:20:26 +01:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"kernelspec": {
|
2021-04-27 23:46:23 +01:00
|
|
|
"name": "pythonjvsc74a57bd0333605e348ea7c6bf4ca805dbc845da062650cb5bf1d8f33f5f4a9d3bca7d68b",
|
|
|
|
"display_name": "Python 3.9.3 ('.venv': venv)"
|
2021-04-10 12:20:26 +01:00
|
|
|
},
|
|
|
|
"language_info": {
|
|
|
|
"codemirror_mode": {
|
|
|
|
"name": "ipython",
|
|
|
|
"version": 3
|
|
|
|
},
|
|
|
|
"file_extension": ".py",
|
|
|
|
"mimetype": "text/x-python",
|
|
|
|
"name": "python",
|
|
|
|
"nbconvert_exporter": "python",
|
|
|
|
"pygments_lexer": "ipython3",
|
2021-04-27 23:46:23 +01:00
|
|
|
"version": "3.9.3"
|
|
|
|
},
|
|
|
|
"metadata": {
|
|
|
|
"interpreter": {
|
|
|
|
"hash": "333605e348ea7c6bf4ca805dbc845da062650cb5bf1d8f33f5f4a9d3bca7d68b"
|
|
|
|
}
|
2021-04-10 12:20:26 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"nbformat": 4,
|
|
|
|
"nbformat_minor": 5
|
2021-04-21 23:43:46 +01:00
|
|
|
}
|