Skip to content

Commit 3360a63

Browse files
committed
chore: Creating notebooks for tutorials
1 parent 163287b commit 3360a63

File tree

7 files changed

+2105
-2
lines changed

7 files changed

+2105
-2
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.ipynb_checkpoints
2+
data

tutorials/01-basics/01-quickstart/main.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,14 @@
6060
# Creating Models #
6161
# ================================================================ #
6262

63-
# Get CPU or GPU device for training
64-
device = ('cuda' if torch.cuda.is_available() else 'cpu')
63+
# Get cpu, gpu or mps device for training.
64+
device = (
65+
"cuda"
66+
if torch.cuda.is_available()
67+
else "mps"
68+
if torch.backends.mps.is_available()
69+
else "cpu"
70+
)
6571
print(f'Using {device} device')
6672

6773

0 commit comments

Comments
 (0)