Test code in pytorch 2.4 (#285)

* test code in pytorch 2.4

* update
This commit is contained in:
Sebastian Raschka
2024-07-24 21:53:41 -05:00
committed by GitHub
parent 6cbe6520a2
commit 08040f024c
17 changed files with 509 additions and 377 deletions

View File

@@ -28,6 +28,27 @@
"# Chapter 3 Exercise solutions"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "513b627b-c197-44bd-99a2-756391c8a1cd",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"torch version: 2.4.0\n"
]
}
],
"source": [
"from importlib.metadata import version\n",
"\n",
"import torch\n",
"print(\"torch version:\", version(\"torch\"))"
]
},
{
"cell_type": "markdown",
"id": "33dfa199-9aee-41d4-a64b-7e3811b9a616",
@@ -38,7 +59,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 2,
"id": "5fee2cf5-61c3-4167-81b5-44ea155bbaf2",
"metadata": {},
"outputs": [],
@@ -59,7 +80,7 @@
},
{
"cell_type": "code",
"execution_count": 58,
"execution_count": 3,
"id": "62ea289c-41cd-4416-89dd-dde6383a6f70",
"metadata": {},
"outputs": [],
@@ -92,7 +113,7 @@
},
{
"cell_type": "code",
"execution_count": 59,
"execution_count": 4,
"id": "7b035143-f4e8-45fb-b398-dec1bd5153d4",
"metadata": {},
"outputs": [],
@@ -123,7 +144,7 @@
},
{
"cell_type": "code",
"execution_count": 60,
"execution_count": 5,
"id": "7591d79c-c30e-406d-adfd-20c12eb448f6",
"metadata": {},
"outputs": [],
@@ -135,7 +156,7 @@
},
{
"cell_type": "code",
"execution_count": 61,
"execution_count": 6,
"id": "ddd0f54f-6bce-46cc-a428-17c2a56557d0",
"metadata": {},
"outputs": [
@@ -150,7 +171,7 @@
" [-0.5299, -0.1081]], grad_fn=<MmBackward0>)"
]
},
"execution_count": 61,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
@@ -161,7 +182,7 @@
},
{
"cell_type": "code",
"execution_count": 62,
"execution_count": 7,
"id": "340908f8-1144-4ddd-a9e1-a1c5c3d592f5",
"metadata": {},
"outputs": [
@@ -176,7 +197,7 @@
" [-0.5299, -0.1081]], grad_fn=<MmBackward0>)"
]
},
"execution_count": 62,
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
@@ -320,7 +341,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.6"
"version": "3.11.4"
}
},
"nbformat": 4,