DIGITS-CNN/cars/lr-investigations/lr.ipynb

544 lines
228 KiB
Plaintext
Raw Normal View History

{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
2021-04-09 13:04:40 +01:00
"id": "a677dbb1",
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import matplotlib as mpl\n",
"from matplotlib import pyplot as plt"
]
},
{
"cell_type": "markdown",
2021-04-09 13:04:40 +01:00
"id": "49ba8631",
"metadata": {},
"source": [
"# Fixed Learning Rate\n",
2021-04-09 13:04:40 +01:00
"80/10/10 Split, 100/200 epochs\n",
"\n",
"## Index\n",
"0. learning rate\n",
"1. top-1 accuracy\n",
"2. top-5 accuracy\n",
"3. last val loss\n",
"4. last val accuracy"
]
},
{
"cell_type": "code",
"execution_count": 2,
2021-04-09 13:04:40 +01:00
"id": "4d96109f",
"metadata": {},
"outputs": [],
"source": [
2021-04-09 13:04:40 +01:00
"fixed_results_200e = np.array([\n",
" [1e-6, 0.31, 2.84, 5.28, 0.67],\n",
" [1e-5, 0.8, 2.59, 5.28, 0.55],\n",
" [1e-4, 6.98, 17.23, 4.6, 7.41],\n",
" [1e-3, 21.56, 44.72, 4.97, 26.9],\n",
" [5e-3, 39.35, 66.83, 3.34, 43.5],\n",
" [1e-2, 13.65, 30.02, 4.15, 17.46],\n",
" [5e-2, 1.79, 6.73, 5.13, 1.78],\n",
" [1e-1, 0.8, 2.78, 5.29, 0.55]\n",
2021-04-09 13:04:40 +01:00
"])\n",
"\n",
"fixed_results_100e = np.array([\n",
" [1e-6, 0.31, 2.9, 5.28, 0.67],\n",
" [1e-5, 0.8, 2.1, 5.28, 0.55],\n",
" [1e-4, 2.35, 8.28, 5.00, 2.63],\n",
" [1e-3, 18.47, 40.09, 4.55, 23.41],\n",
" [5e-3, 35.52, 63.19, 3.33, 40.93],\n",
" [1e-2, 22.42, 47.19, 3.59, 27.02],\n",
" [5e-2, 2.47, 9.02, 5.07, 2.14],\n",
" [1e-1, 0.8, 2.53, 5.28, 0.55]\n",
"])"
]
},
{
"cell_type": "code",
"execution_count": 3,
2021-04-09 13:04:40 +01:00
"id": "345d4c52",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEaCAYAAAAWvzywAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAAsTAAALEwEAmpwYAABmU0lEQVR4nO2dZ3hURReA35NCEkhCgIQaSAJShEACofcuRbEg0lRAPlFUQBErFuyogAoqVqoI2BUElRa6lNB7TeglIZAESNud78fdxAApm7K7KfM+z31279wpZ+7unjt75swZUUqh0Wg0mpKDk6MF0Gg0Go190Ypfo9FoShha8Ws0Gk0JQyt+jUajKWFoxa/RaDQlDK34NRqNpoShFX8RQ0QCRUSJiIsVeYeKyDp7yFWYEYOZIhIrIptt2E47ETlog3oniMh3BV1vQSIiX4jIq46WQ2MdWvHbEBGJFJFkEfG9KX27RXkHOki0jLJ4ikiCiCx1tCw2pC3QDfBXSjXPb2UZHr4JGY6dSqm1Sqm6+Rc3V7J0FJFT9mwzM5RSjyul3iroejO515Ei8mIuys8SkbcLWq6ijlb8tuc4MDDtREQaAqUdJ84t9AWSgG4iUtmeDVvzr6WACAAilVJXc1swBxl9lFKeliMk7+IVbuz4OWWHj1LKE7gfeFVEujlaoKKMVvy2Zy7wcIbzIcCcjBlEpKyIzBGRiyISJSKviIiT5ZqziEwSkWgROQb0zqTstyJyVkROi8jbIuKcC/mGAF8Au4AHb6q7rYhsEJHLInJSRIZa0j1EZLJF1isiss6Sdsvo0zJC62p5P0FEfhKR70QkDhgqIs1FZKOljbMi8qmIlMpQvoGILBORSyJyXkReFpHKInJNRCpkyNfEcv9cb2p/OPAN0MoyYnzDkv6oiByx1PuHiFTNUEaJyJMichg4bO2NzNh/EallqbuJ5byqRb6OlvOWGe7tzrR0y7UgEVktIvEisgzwvaUx6+SpKiI/W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xYwwNry1iAid2PM6aQp1LFAExEZrJQ6iTFKfRljBHwSeI7/fo+DMP59XQJe51bz4M1Uw7B/ZzyCgDsxHujHMf6pfYMxKoZs7rsdeMoixzmM79t8DOVtLX9ifNcfxbg3URjft33Avzfl/Raob/Fe+s3y4MnuvvQA9opIAsaDe4BS6npuO1jYEcuEhkZTJBGRlcD3SqlvHC2LJm+IyPtAZaXUEEfLUlLQI35NkcXy97wJ9h2tavKJiNQTkUZi0BzDDPqro+UqSWivHk2RRERmY6wHGGMxCWmKDl4Y5p2qGDb4yRheWho7YTNTj4jU5caRWE2MRRNzLOmBGK5zDyilYm0ihEaj0WhuwS42fotb32mMCasngUtKqYliBFsqp5R6weZCaDQajQawn42/C3DU4nlxNzDbkp72d12j0Wg0dsJeNv4BGDY9gEoW/3Mw3LkqZVbAEmBpBICHh0dY9eq5XbhoYDabcXIqWXPYus8lA93n4k9++3vo0KFopdTNiyhtH6sHw8c8GkPhA1y+6XpsTnWEhYWpvLJq1ao8ly2q6D6XDHSfiz/57S/GAsJbdKo9Hp09MRbYnLecnxeRKgCW1wt2kEGj0Wg0Fuyh+Afyn5kHjIBVaQs1hqDduDQajcau2FTxW4IbdePGMAMTMXZ7OowRWGmiLWXQaDQazY3YdHJXGQHJKtyUFoPh5ZMvUlJSOHXqFImJidnmK1u2LPv3789vc0WKktBnd3d3/P39cXV1zTmzRqO5gSK7cvfUqVN4eXkRGBhIhlj0txAfH4+Xl5cdJXM8xb3PSiliYmI4deoUQUFBjhZHoylyFFm/qMTERCpUqJCt0tcUT0SEChUq5PhvT+NA1n0Mx9fcmHZ8jZGucThFVvEDWumXYPRnX8ip1gR+HPqf8j++xjiv1sSRUmksFFl
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
2021-04-09 13:04:40 +01:00
"plt.plot(fixed_results_200e[:, 0], fixed_results_200e[:, 1], 'x-', label=\"Top-1 Accuracy\")\n",
"plt.plot(fixed_results_200e[:, 0], fixed_results_200e[:, 2], 'x-', label=\"Top-5 Accuracy\")\n",
"plt.plot(fixed_results_200e[:, 0], fixed_results_200e[:, 4], 'x-', label=\"Final Val. Accuracy\")\n",
"\n",
"plt.ylim(0)\n",
"\n",
"plt.title('Model Accuracy for Fixed Learning Rates')\n",
"plt.ylabel('% Accuracy')\n",
"plt.xlabel('Learning Rate')\n",
"\n",
"plt.legend()\n",
"plt.xscale('log')\n",
"plt.grid()\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 4,
2021-04-09 13:04:40 +01:00
"id": "4fa68d02",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEaCAYAAAAL7cBuAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAAsTAAALEwEAmpwYAAA+WUlEQVR4nO3deXxU5dXA8d9JCAkQSMIEwhLWwQVE9kViFbBWa2vRtta9gtZSa7GbttYuaq1vbd8uthZ9FRdAUdHaqrivxA3ZA8gmEpZAWANJIBCynvePe4NDnOxzZyaT8/185pOZu55n7mTO3Od57n1EVTHGGGNqi4t0AMYYY6KTJQhjjDFBWYIwxhgTlCUIY4wxQVmCMMYYE5QlCGOMMUFZgggTESkRkYEh2M6dIjIvFDHV2u40Efkw4HWd8dZethn7ek1EpjZ3/WgkIneLSIGI7PFwH33d4xIf4u226HiGg4j8WkQeiXQcbU27SAcQa0RkG5ABVAVMPllVkz3eb29gO3CKqubWmvc8kKuqtzR2e6GKV0TuBAap6tUB274gFNsOsq85wE5V/a0X269nv32Bm4F+qrovRNtU4ChQc6FSpaqmAp5+joLE0R/YCiSoamU49x1IVf/o1bZrvdfFwDPAL1S1qt4VCf75jiV2BuGNb6hqcsBjl9c7VNV84B3gu4HTRaQr8DVgrtcxtGF9gQPNSQ4iUt+PtOEBn6HUZk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gp/oz2fYaGvJopolVMqho4Ru9iThxo3HM19e8Pfnc05TvWevIGR5tFuQXc+/ZnPDptDPPeXsmrWyv43tzlPDptTMyW2ZhY8uiHW7n7lfX
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
2021-04-09 13:04:40 +01:00
"plt.plot(fixed_results_200e[:, 0], fixed_results_200e[:, 3], 'x-', label=\"Final Validation Loss\")\n",
"\n",
"# plt.ylim(0)\n",
"\n",
"plt.title('Final Validation Loss for Fixed Learning Rates')\n",
"plt.ylabel('Loss')\n",
"plt.xlabel('Learning Rate')\n",
"\n",
"# plt.legend()\n",
"plt.xscale('log')\n",
"plt.grid()\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
2021-04-09 13:04:40 +01:00
"id": "e57035e6",
"metadata": {},
"source": [
"# Step-Down\n",
"80/10/10 Split, 100 epochs\n",
"\n",
"## Index\n",
"0. learning rate\n",
"1. step size\n",
"2. gamma\n",
"3. top-1 accuracy\n",
"4. top-5 accuracy\n",
"5. last val loss\n",
"6. last val accuracy"
]
},
{
"cell_type": "code",
"execution_count": 5,
2021-04-09 13:04:40 +01:00
"id": "b7c2a026",
"metadata": {},
"outputs": [],
"source": [
"step_down_results = np.array([\n",
" [1e-2, 0.33, 0.1, 43.79, 70.85, 2.79, 47.24],\n",
" [1e-2, 0.33, 0.25, 45.52, 73.07, 2.90, 49.88],\n",
" [1e-2, 0.33, 0.5, 45.71, 71.71, 2.89, 49.39],\n",
" [1e-2, 0.33, 0.75, 40.09, 68.19, 3.00, 46.38]\n",
"])"
]
},
{
"cell_type": "code",
"execution_count": 6,
2021-04-09 13:04:40 +01:00
"id": "53e815da",
"metadata": {},
"outputs": [
{
"data": {
2021-04-09 13:04:40 +01:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEWCAYAAABhffzLAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLj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ljVrQw+RZsbfkb7BUyb2CTK9immH8Ba7HNE/5HDFdhTxhuxP5A3gJ6txaL8x/yMuzJ0L1er+3YBHq1MeZbbA3wDmzzwRrsyTGwJx/XA8udaY9gr0IqA24G/oqtXVZiT2a3ZjpwBfZE8ot4XRbpNFVMBC7AHq5vwTaruKd/jv3PsMo5qgqKMWYe8P+wV9nswR69TAl2eex+vsGJ5yA2oT5mjHndmf43YJCIlIrIP5zC/cfYwnU79qjpr9irOtzexZ63KMEewVxqjKlrJYa1IlKBvWLneuxJxnu9pk/FtnHvxp5E/L3zvd0WYZsalnkNp2GbJA9HBfY8gfs1gdZ/o3/ANp+UYa8e8v99h9L92N/ndmCeE1dNsAsbY9Zj99d/Yv+Pfoyt/OzAHhV7Nx3Ndd6LRcTdzNjafjkVWOr8jd8DbjXGfNPO7xdS4pyMUCrsRORT4A1jTLe9W1NE7sOerP1ppGOJZiLyS+yJ32COmKOe1vhVRDhNJacQ/pun1BFARHqLyJlOM8uJ2KPbdyIdV3ehV/WosBORWdhL/271u3pFqWAlYK/CGoC9LDcfe++DCoI29SilVJTRph6llIoy3aKpJycnx+Tl5XVo2crKSlJSUjo3oDDR2COju8beXeMGjT1UVq5cWWSM8b8fp3sk/ry8PFasaOlqytYtXLiQ8ePHd25AYaKxR0Z3jb27xg0ae6iISMBLpbWpJ5p89iRs97vUe/t
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"plt.plot(step_down_results[:, 2], step_down_results[:, 3], 'x-', label=\"Top-1 Accuracy\")\n",
"plt.plot(step_down_results[:, 2], step_down_results[:, 4], 'x-', label=\"Top-5 Accuracy\")\n",
"plt.plot(step_down_results[:, 2], step_down_results[:, 6], 'x-', label=\"Final Val. Accuracy\")\n",
"\n",
"plt.ylim(0)\n",
"\n",
"plt.title('Model Accuracy for Step Down Learning Rates')\n",
"plt.ylabel('% Accuracy')\n",
2021-04-09 13:04:40 +01:00
"plt.xlabel('Gamma')\n",
"\n",
"plt.legend()\n",
"# plt.xscale('log')\n",
"plt.grid()\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "a37bab2d",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEWCAYAAAB8LwAVAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAAsTAAALEwEAmpwYAAAxo0lEQVR4nO3dd5wU9f3H8deH4452dOQCgnQEFJBuiUaMJmqisfcCimjUXxKjxhKTn8bEaJoxUWNFrEGwxBJLLIg/g0rvRTk6iPRyB1z9/P6YQZdzj9s7bm92797Px2MftzvznZn3zu7tZ+c7szPm7oiIiJRVL+oAIiKSmlQgREQkLhUIERGJSwVCRETiUoEQEZG4VCBERCQuFYgaYmZ5Zta1GuZzu5k9Ux2Zysx3hJl9FPO43Lxl21ZhWW+a2aVVnT4VmdlvzWyjma1L4jIOCl+XjGqe7369njXBzG41s8eizlHX1I86QG1jZsuBHKAkZnBPd89O8nIPBFYAB7t7bplxLwO57n5DovOrrrxmdjvQ3d0vipn3SdUx7zjLGgusdvfbkjH/fSz3IOB6oJO7r6+meTqwE9jzQ6Vid28BJPV9FCdHZ2AZkOnuxTW57Fjufley5l1mXW8DngdudPeSfU5I/Pd3baItiOQ4xd2zY25rk71Ad18DvAdcHDvczFoBJwNPJjtDHXYQsKkqxcHM9vUlrX/Me6hFldOluArWQU3pH34p+g5wLnBZxHlSggpEDTEzN7Pu4f2xZvaAmf3bzHaY2adm1i2m7X1mtsrMtpvZdDM7OsHFPEmZAgGcByxw97lmdrOZ5YbLXGBmpyeYt7WZvRrmmQJ0K9M2bl4zOxG4FTg37BqZHQ7/wMxGhffrmdltZrbCzNab2VNm1jwc1znMcamZrQy7cH6Z4Loo+3yuMLMlZrY5fC7tw+FmZveGy95uZ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_data"
}
],
"source": [
"plt.plot(step_down_results[:, 2], step_down_results[:, 5], 'x-', label=\"Final Validation Loss\")\n",
"\n",
"# plt.ylim(0)\n",
"\n",
"plt.title('Final Validation Loss for Fixed Learning Rates')\n",
"plt.ylabel('Loss')\n",
"plt.xlabel('Gamma')\n",
"\n",
"# plt.legend()\n",
"plt.grid()\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"id": "080c7fcb",
"metadata": {},
"source": [
"# Exponential Decay\n",
"80/10/10 Split, 100 epochs\n",
"\n",
"## Index\n",
"0. learning rate\n",
"1. decay rate\n",
"2. top-1 accuracy\n",
"3. top-5 accuracy\n",
"4. last val loss\n",
"5. last val accuracy"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "ab27ce49",
"metadata": {},
"outputs": [],
"source": [
"exp_results = np.array([\n",
" [1e-2, 0.70, 2.35, 8.09, 4.97, 2.75],\n",
" [1e-2, 0.80, 5.0, 15.57, 4.61, 7.23],\n",
" [1e-2, 0.90, 25.88, 52.5, 3.28, 29.17],\n",
" [1e-2, 0.925, 37.43, 63.37, 3.13, 40.81],\n",
" [1e-2, 0.95, 44.1, 71.22, 2.99, 48.84],\n",
" [1e-2, 0.98, 44.41, 71.83, 3.04, 47.61],\n",
" [1e-2, 0.99, 42.43, 69.55, 3.25, 45.47],\n",
" \n",
" [1e-1, 0.85, 12.91, 34.96, 3.85, 14.89],\n",
" [1e-1, 0.9, 0.8, 2.29, 5.29, 0.55]\n",
"])\n",
"two_results = 7"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "684e1744",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEWCAYAAACJ0YulAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAAsTAAALEwEAmpwYAABh8UlEQVR4nO2dd3gU1deA35NGEgKhJoQ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rgNeAJRhfhU2AYfbmtyFecs5TeFZErgGmAaOUUklKqfnAJoyO8Gx+xugDiMOo5dyplMpQSqWbut6EUSP7wjzPXjt0SsTobxqGUeM4jfFcCjPK2UzEMF7xYjNqyTz3buADjC/gM0BbjBE2RSEJoy8qe+tDwe/uGxhNMgnAr1z+3juSNzHe2yPAClOuNHszK6V2YDQXP4/x3/0d44PpKEYt27Y5arH5Gysi2U2aBd2XTkCEiCQBS4GnlFKHi6hfiSJmZ4hGUyKIyN/AfKVUmZitKiITMTp07y0sraZ0ICKPYnRC21MD1+RC1xQ0JYaIdML4miz9Y7U1ZQYRCRCR7mbTTQuM2vKPzparrKJHH2lKBBGZjTFM8Smz6USjKS48MIbzNsIYahyG0ZSnuQJ085FGo9ForOjmI41Go9FYKRPNR7Vq1VKBgYFXlPfixYtUrly5eAVyMuVNJ61P6ae86VTe9IG8dYqMjDynlMo996hAyoRRCAwMZNOm/EaHFkx4eDi9evUqXoGcTHnTSetT+ilvOpU3fSBvnUTE7qHf2ejmI41Go9FY0UZBo9FoNFa0UdBoNBqNlTLRp5AXGRkZnDhxgtTU1ALT+fr6smfPnhKSqmQobzpdiT6enp7Ur18fd3f3whN
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"plt.plot(exp_results[:two_results, 1], exp_results[:two_results, 2], 'x-', label=\"Top-1 Accuracy\")\n",
"plt.plot(exp_results[:two_results, 1], exp_results[:two_results, 3], 'x-', label=\"Top-5 Accuracy\")\n",
"plt.plot(exp_results[:two_results, 1], exp_results[:two_results, 5], 'x-', label=\"Final Val. Accuracy\")\n",
"\n",
"plt.ylim(0)\n",
"\n",
"plt.title('Model Accuracy for Exponential Learning Rates')\n",
"plt.ylabel('% Accuracy')\n",
"plt.xlabel('Decay Rate')\n",
"\n",
"plt.legend()\n",
"# plt.xscale('log')\n",
"plt.grid()\n",
"plt.show()"
]
},
2021-04-09 13:04:40 +01:00
{
"cell_type": "code",
"execution_count": 10,
"id": "87ee3e82",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAY4AAAEWCAYAAABxMXBSAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAAsTAAALEwEAmpwYAAA72ElEQVR4nO3dd3hUZfbA8e9JDwRCSQiBUBM6BkIQC6sSbCgI664KCq4de3dVVtfC6m9ddZuiCGsHNWJdwIKFtooKBEjoSC8B6SX0wPn9cS84hJSZJJOZTM7neebJnVvPmTszJ/e+d+4rqooxxhjjrbBAB2CMMaZ6scJhjDHGJ1Y4jDHG+MQKhzHGGJ9Y4TDGGOMTKxzGGGN8YoWjCohIgYi0roT1PCEiYysjpiLrvVZEvvN4XmK8Rectx7a+EJFryrt8MBKRp0Rkq4hs8uM2mrv7JbyS11uh/VkVRORPIvJqoOMwv4oIdAChRERWA0nAEY/RbVU1zs/bbQqsAdqp6ooi0z4BVqjqA96ur7LiFZEngDRVHeKx7osqY93FbOtNYL2qPuqP9Zey3ebA/UALVd1cSetUYB9w7EdWhapaD/Dr+6iYOFoCq4BIVS2sym17UtX/89e6i7zWu4D3gT+q6pFSF6T493dNYUccle8SVY3zeOT7e4OqugH4Frjac7yINAAuBt7ydww1WHNgW3mKhoiU9o9bF4/3UL1yRxfkyngNqkoX95+lc4CBwPUBjifoWeGoAiKiIpLmDr8pIi+JyGciskdEfhKRVI95/y0i60Rkt4jkiMhZXm7mLYoUDmAQsEhV54vIwyKywt3mIhG51Mt4G4rIeDeemUBqkXmLjVdE+gB/Aga6p1hy3fFTReRGdzhMRB4VkTUisllE3haReHdaSzeOa0RkrXsq6BEvX4ui+dwkIstFZLubSxN3vIjIP91t7xaR+SLS2Z12sfs67RGRDSJy0hGbiJwHfA00cXN80x3fX0QWishON98OHsusFpGHRCQP2OvtF6fH6xEhIg1EZL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sqspwYD3O++kbN66D3i6sqvNx3o9/pHzv79Jel1OBn0SkABgP3K2qK33MLyiI22hjjDEhR0RuxWk4P6fMmY3X7IjDGBMyRCRZRHq6p4na4Zwq/CTQcYWaYPjVpjHGVJYonCuZWuFcypwNvBzIgEKRnaoyxhjjEztVZYwxxichc6oqISFBW7ZsWe7l9+7dS+3atcuesZoItXwg9HIKtXwg9HIKtXzg5JxycnK2qmqiL+sImcLRsmVLZs+eXe7lp06dSq9evSovoAALtXwg9HIKtXwg9HIKtXzg5JxExOe7B9ipKmOMMT6xwmGMMcYnfi0c4tx3f757c72TziOJ4wVx+hLIE5FuHtOuEZGf3Yc3t0UwxhhTBaqijSNLVbeWMO0inNt/t8G5K+VInDt7NsC5DXR3nFsp5IjIeFXdUQXxGmOMKUWgT1UNAN5270z5I1BPRJJxOtj5WlW3u8Xia6BPIAM1xhjj8OsPAEVkFb/eBXKUqo4uMn0i8Iyqfuc+/xZ4CKdznBhVfcod/2dgv6o+X2T5ocBQgKSkpMzs7Gyf4vt85SFaxYfToWE4BQUFxMXFsXjbEVbtOsLFraPKkXHwOJZPKAm1nEItHwi9nEItHzg5p6ysrBxV7e7LOvx9quo3qrpBRBoBX4vIElWdXlkrdwvRaIDu3burr5fNRTXbyh3vzmXEVV2IW7eAqGad+c//5jLiqm6cmeptX0TBqSZcRljdhVo+EHo5hVo+UDk5+bVwqOqxznI2i8gnOP1sexaODZzY0UqKO24DzlGH5/iplR3fmakJjLgyg+vfnEVGgrBk+hxeGlz9i4YxxviT39o4RKS2iNQ5NozTR8CCIrONB/7gXl11OrDL7QxlEnCB2xlLfXfZSf6IM6V+LY4cUX7YeIQ
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"plt.plot(exp_results[:two_results, 1], exp_results[:two_results, 4], 'x-', label=\"Final Validation Loss\")\n",
"\n",
"# plt.ylim(0)\n",
"\n",
"plt.title('Final Validation Loss for Fixed Learning Rates')\n",
"plt.ylabel('Loss')\n",
"plt.xlabel('Decay Rate')\n",
"\n",
"# plt.legend()\n",
"plt.grid()\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"id": "ce1b8019",
"metadata": {},
"source": [
"# Sigmoid Decay\n",
"80/10/10 Split, 100 epochs\n",
"\n",
"## Index\n",
"0. learning rate\n",
"1. step size\n",
"2. gamma\n",
"3. top-1 accuracy\n",
"4. top-5 accuracy\n",
"5. last val loss\n",
"6. last val accuracy"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "c4c39704",
"metadata": {},
"outputs": [],
"source": [
"sig_results = np.array([\n",
" [1e-2, 50, 0.05, 46.94, 72.88, 2.79, 52.94],\n",
" [1e-2, 50, 0.1, 45.95, 73.63, 2.65, 51.29],\n",
" [1e-2, 50, 0.15, 41.94, 68.56, 2.94, 47.49],\n",
" [1e-2, 50, 0.2, 41.82, 68.13, 2.82, 45.16]\n",
"])"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "0a2e899f",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEWCAYAAABhffzLAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAAsTAAALEwEAmpwYAABFY0lEQVR4nO2deXwV5fX/3yd7QjZIIIRFgqgosgqiIpWIUu0iaq27xa1aa7W1lq+12l9LXb5ftdRq1Vptq4gLEax7RatIpIqyLyIoa1AghC2EhOzJ+f0xk5t7k5vkhtybXLjn/XpNZnmeeZ7PzNycZ50zoqoYhmEYkUNUVwswDMMwOhcz/IZhGBGGGX7DMIwIwwy/YRhGhGGG3zAMI8Iww28YhhFhmOEPM0QkR0RURGICiHuNiHzcGbrCGXF4VkSKRWRxJ+T3NxH5f6HOp735ur+bYzpTU3sQkaNEpExEortaS6Rjhr8DiEiBiFSLSGaT4yvcf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62uAnON0Qm3CmzP609ehGgJyP00+/A2eiwmVqXRRBwbp6DMMwIgyr8RuGYUQYXe1UKSAyMzM1Jyenq2UAcPDgQbp169bVMlol3DWGuz4wjcEg3PVB+GvsqL5ly5btUdWm79ocHi4bRo8ereHC/Pnzu1pCm4S7xnDXp2oag0G461MNf40d1QcsVXPZYHQZHz8CWxb4HtuywDluGEanYobf6Bz6ngRzrmk0/lsWOPt9T+pKVYYRkRwWffzt5uNHHIMy8IzGY1sWwPblMP62rlLVNdTXQ30N1NVAXTXU1zrrOvdYvXu8zj3uiesdv6aVsADTqq+BlN7w/IWcGpMG/y2FIRdAyTb4ehFkDIK
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"plt.plot(sig_results[:, 2], sig_results[:, 3], 'x-', label=\"Top-1 Accuracy\")\n",
"plt.plot(sig_results[:, 2], sig_results[:, 4], 'x-', label=\"Top-5 Accuracy\")\n",
"plt.plot(sig_results[:, 2], sig_results[:, 6], 'x-', label=\"Final Val. Accuracy\")\n",
"\n",
"plt.ylim(0)\n",
"\n",
"plt.title('Model Accuracy for Sigmoid Learning Rates')\n",
"plt.ylabel('% Accuracy')\n",
"plt.xlabel('Gamma')\n",
"\n",
"plt.legend()\n",
"# plt.xscale('log')\n",
"plt.grid()\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "53b1a3b8",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEWCAYAAAB8LwAVAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAAsTAAALEwEAmpwYAAA+pklEQVR4nO3dd3wUdf7H8dcnHVLohN6bSA8dFBHhPP3ZEEVRsCMKHtbT09/15u88saECoiK2WFHOBigRRHrvhN57TWhpn98fM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KV5HKFCoZwz1fKqhnzHU86laxkAoTj5gsZb0pTZUda+qLnXvpwHr+PmlBsD55epMt816nB+cJGKMMcZzJXKQWpxOR2YDbVT1hM/wf+Bc1OohEemK80vTbqq6RES28t9fGo5X1Ql5zHs4MBwgMTExKTk5ObgPppDS09OJiyvRvl2KLNQzhno+CP2MoZ4PLGMgFCdf3759l2heu/Dz2rQI1A3nF5tLgIF+xiXg/IpzOc6vaRcBHdxxdd2/NYEVwMUFLct2MRVNqGcM9XyqoZ8x1POpWsZACNYupqD+DsK9Ds0nwLuq+ouf2quzNXGH21Zwfhq/xR137kJqB8TpMrMrzlaIMcaYEhC0YxDuB/7rwDpVHZNHm8ruxdTAuWb7bFU9ISKxIhLvtonFua7M6mBlNcYY80vB3ILohXOxs1Uistwd9iTupYVVdRxO711vidNp+BrgLrddIjDFqTFEAO+p6jdBzGqMyce4WZtpV68SPZv+txuEuZsPsXLXcUb0Oa8eS00pELQCoapzKKCvAVWdh3P9/dzDt+B0I2iMCQHt6lV
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"plt.plot(sig_results[:, 2], sig_results[:, 5], 'x-', label=\"Final Validation Loss\")\n",
"\n",
"# plt.ylim(0)\n",
"\n",
"plt.title('Final Validation Loss for Fixed Learning Rates')\n",
"plt.ylabel('Loss')\n",
"plt.xlabel('Gamma')\n",
"\n",
"# plt.legend()\n",
"plt.grid()\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"id": "82bd3a32",
"metadata": {},
"source": [
"# Best\n",
"\n",
"100 Epochs\n",
"\n",
"top-1 accuracy indexes: 1, 3, 2, 3"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "c866fad2",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAhAAAAEWCAYAAAA3sa4JAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQu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R/8zxzY0p95soxljP30Y9x2nEfO8l0vt8FqljeC31vj4vAp8pi7NHRLwUETMj4tSIWBf4BOlvtGZHbScQtkhRsjvpuutTETGH9IF3tqTSt7JVJe2clz+n1HFMpOvcs4E5eXevUv2Dt5oHgGlKHdN65m+360vaPB/vS5L657gm523mkJpt51Q7nqQewBdJnSeHFB5HAfvnjl0XAj+SNDi/DhtK6ke6PryypGOVOpT2lvTxvOuxwGclrZBbbI5t4/xKyc7rOa6DmfdPnhzDdyVtmmMYVOpMFvM6uF5O6sfx3zaORd5uNqlZ+vQc++rAt0nfpusWEROAe0n9Dm6LiNK31t6kD+FJpA+MnzSy37y/gyUNkbR03v7+iJgQEa+TEokv5ffCIRT+0UvaW1LpQ/Yt0ms7h+qWzp3deuT3xKvAKOAXkpbLneQ+KulThXObDkyRtCqpL0FHuRo4QdLy+dhHVqsoaRulToClv9F1SAn9fblKtfd2W87LMayX99tH0t553U3AepK+kP9+jmb+JGEs8ElJqyl1ZDxhAY/TiCuAb0laQ1Iv0nvpqoiY1cZ2Vf/uKsR5emmdpP75/yWStpO0gVIH3KmkpL3We9EJhC0y/qI0/sJU4HTgwIgo3QZ4HOkyxX25GffvpGuLAIPz8+mkDo6/i4g787qfAifl5r7v1hNE/rD7HLlXOenb84Wkb7aQbh18Isd6Dul68bsR8U6O+x/5eFuW7XoPUkvK8Pyt9X/5A/AiUhPnLsAvSf+0R+X
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"\n",
"best_top_1_results = list()\n",
"best_labels = list()\n",
"\n",
"# Fixed\n",
"b_fixed = fixed_results_100e[np.argmax(fixed_results_100e[:, 1])]\n",
"best_top_1_results.append(b_fixed[1:3])\n",
"best_labels.append(f'Fixed\\n{b_fixed[0]}')\n",
"\n",
"# Step Down\n",
"b_sd = step_down_results[np.argmax(step_down_results[:, 3])]\n",
"best_top_1_results.append(b_sd[3:5])\n",
"best_labels.append(f'Step Down\\n{b_sd[0]}, Step: {b_sd[1]}, Gamma: {b_sd[2]}')\n",
"\n",
"# Exp\n",
"b_exp = exp_results[np.argmax(exp_results[:, 2])]\n",
"best_top_1_results.append(b_exp[2:4])\n",
"best_labels.append(f'Exponential Decay\\n{b_exp[0]}, Rate: {b_exp[1]}')\n",
"\n",
"# Sig\n",
"b_sig = sig_results[np.argmax(sig_results[:, 3])]\n",
"best_top_1_results.append(b_sig[3:5])\n",
"best_labels.append(f'Sigmoid Decay\\n{b_sig[0]}, Step: {b_sig[1]}, Gamma: {b_sig[2]}')\n",
"\n",
"# print(best_top_1_results)\n",
"# print(best_labels)\n",
"# print(best_top_1_results)\n",
"plt.barh(range(len(best_labels)), [i[0] for i in best_top_1_results], tick_label=best_labels, label='Top-1')\n",
"plt.barh(range(len(best_labels)), [i[1] - i[0] for i in best_top_1_results], tick_label=best_labels, label='Top-5', left=[i[0] for i in best_top_1_results])\n",
"\n",
"plt.legend()\n",
"plt.grid(axis='x')\n",
"plt.title('Best Test Accuracy for Various Learning Schedule Policies')\n",
"plt.xlabel('% Test Accuracy')\n",
"plt.ylabel('Learning Schedule Policies')\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
2021-04-09 13:04:40 +01:00
"id": "39bd3540",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.4"
}
},
"nbformat": 4,
"nbformat_minor": 5
}