From e6198b5bfae720ea0dffdc854c93bbccf1ad061b Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 9 Apr 2021 19:21:11 +0000 Subject: [PATCH] latest --- stanford_dog/train_cub.ipynb | 337 ++++++++++++++++++++++++----------- 1 file changed, 234 insertions(+), 103 deletions(-) diff --git a/stanford_dog/train_cub.ipynb b/stanford_dog/train_cub.ipynb index 704e3b5..23ff105 100644 --- a/stanford_dog/train_cub.ipynb +++ b/stanford_dog/train_cub.ipynb @@ -683,15 +683,113 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 31, "metadata": {}, "outputs": [ + { + "data": { + "text/html": [ + "Finishing last run (ID:1qm7l02u) before initializing another..." + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
Waiting for W&B process to finish, PID 399597
Program ended successfully." + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "9e6f42eafb2b4d4cb1893d6b90522f0f", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "VBox(children=(Label(value=' 0.00MB of 0.00MB uploaded (0.00MB deduped)\\r'), FloatProgress(value=1.0, max=1.0)…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "Find user logs for this run at: /home/code-base/fgvc/stanford_dog/wandb/run-20210409_055803-1qm7l02u/logs/debug.log" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "Find internal logs for this run at: /home/code-base/fgvc/stanford_dog/wandb/run-20210409_055803-1qm7l02u/logs/debug-internal.log" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "Synced 5 W&B file(s), 0 media file(s), 0 artifact file(s) and 0 other file(s)" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "\n", + "
Synced dashing-deluge-96: https://wandb.ai/keremturgutlu/fgvc-2021/runs/1qm7l02u
\n", + " " + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "...Successfully finished last run (ID:1qm7l02u). Initializing new run:

" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, { "name": "stderr", "output_type": "stream", "text": [ - "Failed to detect the name of this notebook, you can set it manually with the WANDB_NOTEBOOK_NAME environment variable to enable code saving.\n", - "\u001b[34m\u001b[1mwandb\u001b[0m: Currently logged in as: \u001b[33mkeremturgutlu\u001b[0m (use `wandb login --relogin` to force relogin)\n", "\u001b[34m\u001b[1mwandb\u001b[0m: wandb version 0.10.25 is available! To upgrade, please run:\n", "\u001b[34m\u001b[1mwandb\u001b[0m: $ pip install wandb --upgrade\n" ] @@ -701,10 +799,10 @@ "text/html": [ "\n", " Tracking run with wandb version 0.10.23
\n", - " Syncing run noble-pond-94 to Weights & Biases (Documentation).
\n", + " Syncing run whole-dust-97 to Weights & Biases (Documentation).
\n", " Project page: https://wandb.ai/keremturgutlu/fgvc-2021
\n", - " Run page: https://wandb.ai/keremturgutlu/fgvc-2021/runs/26zo787r
\n", - " Run data is saved locally in /home/code-base/fgvc/stanford_dog/wandb/run-20210409_022746-26zo787r

\n", + " Run page: https://wandb.ai/keremturgutlu/fgvc-2021/runs/3k4dtmon
\n", + " Run data is saved locally in /home/code-base/fgvc/stanford_dog/wandb/run-20210409_055822-3k4dtmon

\n", " " ], "text/plain": [ @@ -732,21 +830,39 @@ " \n", " \n", " 0\n", - " 6.676136\n", - " 6.286286\n", - " 0.649465\n", - " 0.641698\n", - " 0.566966\n", - " 19:52\n", + " 3.170130\n", + " 3.957583\n", + " 0.896445\n", + " 0.906973\n", + " 0.884363\n", + " 29:16\n", " \n", " \n", " 1\n", - " 4.719569\n", - " 4.658880\n", - " 0.854850\n", - " 0.857439\n", - " 0.807214\n", - " 19:57\n", + " 3.185068\n", + " 3.958315\n", + " 0.894373\n", + " 0.907490\n", + " 0.881774\n", + " 29:18\n", + " \n", + " \n", + " 2\n", + " 3.136266\n", + " 3.956597\n", + " 0.896445\n", + " 0.905937\n", + " 0.883845\n", + " 29:20\n", + " \n", + " \n", + " 3\n", + " 3.130231\n", + " 3.952785\n", + " 0.898688\n", + " 0.906455\n", + " 0.884708\n", + " 29:22\n", " \n", " \n", "" @@ -766,78 +882,104 @@ " warnings.warn(\"None of the inputs have requires_grad=True. Gradients will be None\")\n" ] }, + { + "data": { + "text/html": [ + "
Waiting for W&B process to finish, PID 399633
Program ended successfully." + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "a421d3c307e24756a2b768672e871cd5", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "VBox(children=(Label(value=' 0.02MB of 0.02MB uploaded (0.00MB deduped)\\r'), FloatProgress(value=1.0, max=1.0)…" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "Find user logs for this run at: /home/code-base/fgvc/stanford_dog/wandb/run-20210409_055822-3k4dtmon/logs/debug.log" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "Find internal logs for this run at: /home/code-base/fgvc/stanford_dog/wandb/run-20210409_055822-3k4dtmon/logs/debug-internal.log" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "

Run summary:


\n", + "
epoch4
train_loss3.13023
raw_loss2.97068
wd_00.01
sqr_mom_00.99
lr_00.0
mom_00.95
eps_00.0
beta_00.0
wd_10.01
sqr_mom_10.99
lr_10.0
mom_10.95
eps_10.0
beta_10.0
wd_20.01
sqr_mom_20.99
lr_20.0
mom_20.95
eps_20.0
beta_20.0
_runtime7044
_timestamp1617954949
_step1195
valid_loss3.95278
accuracyA0.89869
accuracyB0.90645
accuracyC0.88471
" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "

Run history:


\n", + "
epoch▁▁▁▁▂▂▂▂▂▃▃▃▃▃▃▄▄▄▄▄▅▅▅▅▅▅▆▆▆▆▆▇▇▇▇▇▇███
train_loss▄█▇▇▅▇▇▇▇▅▅▆▇▆▅▆▅█▆▇▆▄▅▅▅▆▄▄▄▃▃▂▂▁▁▁▃▃▃▄
raw_loss▁▆▂▃▁▄▃▆▆▃▂▆▃▁▂▃▅█▂▇▄▃▂▃▃▆▃▄▃▃▅▂▃▂▃▂▂▂▂▄
wd_0▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁
sqr_mom_0▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁
lr_0▁▁▁▂▂▂▃▃▄▄▅▅▆▆▇▇▇██████▇▇▇▆▆▅▅▄▄▃▃▂▂▂▁▁▁
mom_0████▇▇▆▆▆▅▄▄▃▃▂▂▂▁▁▁▁▁▁▂▂▂▃▃▄▄▅▅▆▆▇▇▇███
eps_0▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁
beta_0▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁
wd_1▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁
sqr_mom_1▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁
lr_1▁▁▁▂▂▂▃▃▄▄▅▅▆▆▇▇▇██████▇▇▇▆▆▅▅▄▄▃▃▂▂▂▁▁▁
mom_1████▇▇▆▆▆▅▄▄▃▃▂▂▂▁▁▁▁▁▁▂▂▂▃▃▄▄▅▅▆▆▇▇▇███
eps_1▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁
beta_1▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁
wd_2▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁
sqr_mom_2▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁
lr_2▁▁▁▂▂▂▃▃▄▄▅▅▆▆▇▇▇██████▇▇▇▆▆▅▅▄▄▃▃▂▂▂▁▁▁
mom_2████▇▇▆▆▆▅▄▄▃▃▂▂▂▁▁▁▁▁▁▂▂▂▃▃▄▄▅▅▆▆▇▇▇███
eps_2▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁
beta_2▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁
_runtime▁▁▁▁▁▂▂▂▂▂▃▃▃▃▃▄▄▄▄▄▅▅▅▅▅▅▆▆▆▆▇▇▇▇▇▇████
_timestamp▁▁▁▁▁▂▂▂▂▂▃▃▃▃▃▄▄▄▄▄▅▅▅▅▅▅▆▆▆▆▇▇▇▇▇▇████
_step▁▁▁▁▂▂▂▂▂▃▃▃▃▃▃▄▄▄▄▄▅▅▅▅▅▅▆▆▆▆▆▇▇▇▇▇▇███
valid_loss▇█▆▁
accuracyA▄▁▄█
accuracyB▆█▁▃
accuracyC▇▁▆█

" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "Synced 5 W&B file(s), 1 media file(s), 0 artifact file(s) and 0 other file(s)" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, { "data": { "text/html": [ "\n", - "
\n", - " \n", - " \n", - " 50.00% [2/4 58:06<58:06]\n", - "
\n", - " \n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
epochtrain_lossvalid_lossaccuracyAaccuracyBaccuracyCtime
04.0443074.3208580.8717640.8786680.84691129:01
13.9474484.1854830.8700380.8769420.85036229:02

\n", - "\n", - "

\n", - " \n", - " \n", - " 10.37% [31/299 02:00<17:23 3.7864]\n", - "
\n", - " " + "
Synced whole-dust-97: https://wandb.ai/keremturgutlu/fgvc-2021/runs/3k4dtmon
\n", + " " ], "text/plain": [ "" @@ -928,10 +1070,13 @@ " \n", " lr = 3e-3\n", " epochs = 2\n", - " learn.freeze_to(-1)\n", - " learn.fit_one_cycle(epochs, lr_max=(lr), pct_start=0.5)\n", + " \n", + "# learn.freeze_to(-1)\n", + "# learn.fit_one_cycle(epochs, lr_max=(lr), pct_start=0.5)\n", "\n", - " lr /= 3\n", + "# lr /= 3\n", + " learn.load(\"cup_model_epoch_3\")\n", + " lr /=30\n", " epochs = 4\n", " learn.unfreeze()\n", " learn.fit_one_cycle(int(epochs), lr_max=[lr/50,lr,lr], pct_start=0.5)\n", @@ -978,20 +1123,6 @@ "outputs": [], "source": [] }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, { "cell_type": "code", "execution_count": null,