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 dde7670 commit 617ff9fCopy full SHA for 617ff9f
beginner_source/basics/buildmodel_tutorial.py
@@ -33,7 +33,7 @@
33
# Get Device for Training
34
# -----------------------
35
# We want to be able to train our model on an `accelerator <https://pytorch.org/docs/stable/torch.html#accelerators>`
36
-# like CUDA, MPS, MTIA, or XPU. If the current accelerator is available, we will use it, otherwise we use the CPU.
+# such as CUDA, MPS, MTIA, or XPU. If the current accelerator is available, we will use it. Otherwise, we use the CPU.
37
38
device = torch.accelerator.current_accelerator().type if torch.accelerator.is_available() else "cpu"
39
print(f"Using {device} device")
0 commit comments