We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3122205 commit fd984ebCopy full SHA for fd984eb
beginner_source/basics/buildmodel_tutorial.py
@@ -34,7 +34,7 @@
34
# -----------------------
35
# We want to be able to train our model on a hardware accelerator like the GPU or MPS,
36
# if available. Let's check to see if `torch.cuda <https://pytorch.org/docs/stable/notes/cuda.html>`_
37
-# or `torch.backends.mps <https://pytorch.org/docs/stable/notes/mps.html> are available, otherwise we use the CPU.
+# or `torch.backends.mps <https://pytorch.org/docs/stable/notes/mps.html>` are available, otherwise we use the CPU.
38
39
device = "cuda" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu"
40
print(f"Using {device} device")
0 commit comments