mirror of
https://github.com/mrdbourke/pytorch-deep-learning.git
synced 2026-11-27 06:07:09 +00:00
make docstring for function
This commit is contained in:
1 parent
7af9991435
commit
e3553ad455
1 file changed
+12
-3
@@ -1229,7 +1229,16 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"def plot_results(results): \n",
|
||||
"def plot_loss_curves(results):\n",
|
||||
" \"\"\"Plots training curves of a results dictionary.\n",
|
||||
"\n",
|
||||
" Args:\n",
|
||||
" results (dict): dictionary containing list of values, e.g.\n",
|
||||
" {\"train_loss\": [...],\n",
|
||||
" \"train_acc\": [...],\n",
|
||||
" \"test_loss\": [...],\n",
|
||||
" \"test_acc\": [...]}\n",
|
||||
" \"\"\"\n",
|
||||
" loss = results['train_loss']\n",
|
||||
" test_loss = results['test_loss']\n",
|
||||
"\n",
|
||||
@@ -1276,7 +1285,7 @@
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"plot_results(results)"
|
||||
"plot_loss_curves(results)"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -1517,7 +1526,7 @@
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"plot_results(results)"
|
||||
"plot_loss_curves(results)"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user