Skip to content

Commit

Permalink
Update beginner_source/basics/buildmodel_tutorial.py
Browse files Browse the repository at this point in the history
Co-authored-by: Svetlana Karslioglu <svekars@meta.com>
  • Loading branch information
guangyey and svekars authored Nov 26, 2024
1 parent 617ff9f commit e57d5f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion beginner_source/basics/buildmodel_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#############################################
# Get Device for Training
# -----------------------
# We want to be able to train our model on an `accelerator <https://pytorch.org/docs/stable/torch.html#accelerators>`
# We want to be able to train our model on an `accelerator <https://pytorch.org/docs/stable/torch.html#accelerators>`__
# such as CUDA, MPS, MTIA, or XPU. If the current accelerator is available, we will use it. Otherwise, we use the CPU.

device = torch.accelerator.current_accelerator().type if torch.accelerator.is_available() else "cpu"
Expand Down

0 comments on commit e57d5f2

Please sign in to comment.