Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbourbeau committed May 16, 2024
1 parent d8cf381 commit b7b0ab5
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions pytorch.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
" # Confirm that GPU shows up\n",
" if torch.cuda.is_available():\n",
" device = \"cuda\"\n",
" print(\"Using GPU {torch.cuda.get_device_name(torch.cuda.current_device())} 😎\\n\")\n",
" print(f\"Using GPU {torch.cuda.get_device_name(torch.cuda.current_device())} 😎\\n\")\n",
" else:\n",
" device = \"cpu\"\n",
" print(\"Using CPU 😔\\n\")\n",
Expand Down Expand Up @@ -217,13 +217,21 @@
"\n",
"model = train_on_gpu()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "b6e7ae53-ce21-49f3-856a-87774a19bf37",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda env:pytorch]",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "conda-env-pytorch-py"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -235,7 +243,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.14"
"version": "3.11.9"
}
},
"nbformat": 4,
Expand Down

0 comments on commit b7b0ab5

Please sign in to comment.