Skip to content

Commit 63c0142

Browse files
committed
fix f string inconsistencies
1 parent 533531f commit 63c0142

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

beginner_source/basics/buildmodel_tutorial.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
# `torch.cuda <https://pytorch.org/docs/stable/notes/cuda.html>`_ is available, else we
3838
# continue to use the CPU.
3939

40-
device = 'cuda' if torch.cuda.is_available() else 'cpu'
41-
print('Using {} device'.format(device))
40+
device = "cuda" if torch.cuda.is_available() else "cpu"
41+
print(f"Using {device} device")
4242

4343
##############################################
4444
# Define the Class

beginner_source/basics/quickstart_tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989

9090
# Get cpu or gpu device for training.
9191
device = "cuda" if torch.cuda.is_available() else "cpu"
92-
print("Using {} device".format(device))
92+
print(f"Using {device} device")
9393

9494
# Define model
9595
class NeuralNetwork(nn.Module):

0 commit comments

Comments
 (0)