mirror of
https://github.com/mrdbourke/pytorch-deep-learning.git
synced 2026-11-27 06:07:09 +00:00
update 06 notebooks
This commit is contained in:
1 parent
3dc2f15c5e
commit
11c459f271
2 files changed
+31
-31
No files matched your search
@@ -17,7 +17,7 @@
|
||||
"\n",
|
||||
"> **Note:** There are a few updates coming in `torchvision` v0.13 that will mean some of the code in this notebook will be deprecated in the future, mainly the used of `torchvision.models.model_name(pretrained=True)`, the `pretrained=True` part is getting changed.\n",
|
||||
"> \n",
|
||||
"> The concepts in this notebook are still valid for `torchvision` versions prior to v0.13, however for the latest and most up-to-date code refer to `06_pytorch_transfer_learning_v2.ipynb`.\n",
|
||||
"> The concepts in this notebook are still valid for `torchvision` versions prior to v0.13, however for the latest and most up-to-date code refer to [`06_pytorch_transfer_learning_v2.ipynb`](https://www.learnpytorch.io/06_pytorch_transfer_learning_v2/).\n",
|
||||
">\n",
|
||||
"> As of June 2022, `torchvision` v0.13 is still in beta but once it becomes the standard, I will replace this notebook with the updated version.\n",
|
||||
"\n",
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"execution_count": 23,
|
||||
"id": "8ed820be",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
@@ -187,7 +187,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"execution_count": 24,
|
||||
"id": "0797a4ff-512e-4c46-a82a-e913e0db10a8",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
@@ -231,7 +231,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"execution_count": 25,
|
||||
"id": "b93a75c4-6e40-4575-8d60-d1d43be9220f",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
@@ -241,7 +241,7 @@
|
||||
"'cuda'"
|
||||
]
|
||||
},
|
||||
"execution_count": 4,
|
||||
"execution_count": 25,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@@ -270,7 +270,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"execution_count": 26,
|
||||
"id": "8dfd6e3f-3f0d-4fca-9835-6a45a7c797c3",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
@@ -330,7 +330,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 6,
|
||||
"execution_count": 27,
|
||||
"id": "e3e04e57-44e8-4c13-97db-ba9a21a1924c",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
@@ -400,7 +400,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"execution_count": 28,
|
||||
"id": "4e095ac1-af8e-4215-8028-de97cfb65c39",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
@@ -434,19 +434,19 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 8,
|
||||
"execution_count": 29,
|
||||
"id": "f7d97a6f-50f8-4212-a777-3d2cfac2a4fe",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"(<torch.utils.data.dataloader.DataLoader at 0x7f4b80ffae60>,\n",
|
||||
" <torch.utils.data.dataloader.DataLoader at 0x7f4b80ffb970>,\n",
|
||||
"(<torch.utils.data.dataloader.DataLoader at 0x7f4b80b11fc0>,\n",
|
||||
" <torch.utils.data.dataloader.DataLoader at 0x7f4b80b13d60>,\n",
|
||||
" ['pizza', 'steak', 'sushi'])"
|
||||
]
|
||||
},
|
||||
"execution_count": 8,
|
||||
"execution_count": 29,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@@ -490,7 +490,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 9,
|
||||
"execution_count": 30,
|
||||
"id": "d3f4bd4c-7b7a-41fb-8d1c-ae96ee88f024",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
@@ -500,7 +500,7 @@
|
||||
"EfficientNet_B0_Weights.IMAGENET1K_V1"
|
||||
]
|
||||
},
|
||||
"execution_count": 9,
|
||||
"execution_count": 30,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@@ -523,7 +523,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 10,
|
||||
"execution_count": 31,
|
||||
"id": "29924062-a233-4926-a77a-9052d1956938",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
@@ -539,7 +539,7 @@
|
||||
")"
|
||||
]
|
||||
},
|
||||
"execution_count": 10,
|
||||
"execution_count": 31,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@@ -566,19 +566,19 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 11,
|
||||
"execution_count": 32,
|
||||
"id": "7c21ffb5-a6d9-40d5-b0d0-47828612d282",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"(<torch.utils.data.dataloader.DataLoader at 0x7f4b80ff9ff0>,\n",
|
||||
" <torch.utils.data.dataloader.DataLoader at 0x7f4b80ff87f0>,\n",
|
||||
"(<torch.utils.data.dataloader.DataLoader at 0x7f4b80ff8580>,\n",
|
||||
" <torch.utils.data.dataloader.DataLoader at 0x7f4b80ff9f30>,\n",
|
||||
" ['pizza', 'steak', 'sushi'])"
|
||||
]
|
||||
},
|
||||
"execution_count": 11,
|
||||
"execution_count": 32,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@@ -685,7 +685,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 12,
|
||||
"execution_count": 33,
|
||||
"id": "7593110c-0b32-47e6-9e29-f33d6c0ac840",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
@@ -757,7 +757,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 13,
|
||||
"execution_count": 34,
|
||||
"id": "524020c6-09d3-4ecf-b791-dbd71ed389e3",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
@@ -817,7 +817,7 @@
|
||||
"============================================================================================================================================"
|
||||
]
|
||||
},
|
||||
"execution_count": 13,
|
||||
"execution_count": 34,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@@ -879,7 +879,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 14,
|
||||
"execution_count": 35,
|
||||
"id": "d9cbf97f-5dbf-4283-b70f-91b49e3713e5",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
@@ -923,7 +923,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 15,
|
||||
"execution_count": 36,
|
||||
"id": "79e804bd-5ddd-470c-9c95-a4150cc1cc3c",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
@@ -955,7 +955,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 16,
|
||||
"execution_count": 37,
|
||||
"id": "d5370a8b-34cf-441f-925d-4120a929ed62",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
@@ -1015,7 +1015,7 @@
|
||||
"============================================================================================================================================"
|
||||
]
|
||||
},
|
||||
"execution_count": 16,
|
||||
"execution_count": 37,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@@ -1066,7 +1066,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 17,
|
||||
"execution_count": 38,
|
||||
"id": "582200bb-c3f8-4044-ae59-007b921a2422",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
@@ -1094,14 +1094,14 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 18,
|
||||
"execution_count": 39,
|
||||
"id": "0e698d13-dedf-48f7-bca3-b21cd969b2d2",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"application/vnd.jupyter.widget-view+json": {
|
||||
"model_id": "50a8ea5f97e148ff91640edd44455563",
|
||||
"model_id": "146bf642685b430c93608c9ddcf19311",
|
||||
"version_major": 2,
|
||||
"version_minor": 0
|
||||
},
|
||||
@@ -1121,7 +1121,7 @@
|
||||
"Epoch: 3 | train_loss: 0.7648 | train_acc: 0.8008 | test_loss: 0.7433 | test_acc: 0.8561\n",
|
||||
"Epoch: 4 | train_loss: 0.7114 | train_acc: 0.7578 | test_loss: 0.6344 | test_acc: 0.8655\n",
|
||||
"Epoch: 5 | train_loss: 0.6252 | train_acc: 0.7930 | test_loss: 0.6238 | test_acc: 0.8864\n",
|
||||
"[INFO] Total training time: 6.051 seconds\n"
|
||||
"[INFO] Total training time: 5.977 seconds\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
Reference in new issue
Block a user