We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6cd0e06 commit 2f68be0Copy full SHA for 2f68be0
beginner_source/basics/buildmodel_tutorial.py
@@ -37,8 +37,8 @@
37
# `torch.cuda <https://pytorch.org/docs/stable/notes/cuda.html>`_ is available, else we
38
# continue to use the CPU.
39
40
-device = 'cuda' if torch.cuda.is_available() else 'cpu'
41
-print(f'Using {device} device')
+device = "cuda" if torch.cuda.is_available() else "cpu"
+print(f"Using {device} device")
42
43
##############################################
44
# Define the Class
@@ -181,7 +181,7 @@ def forward(self, x):
181
#
182
183
184
-print("Model structure: ", model, "\n\n")
+print(f"Model structure: {model}\n\n")
185
186
for name, param in model.named_parameters():
187
print(f"Layer: {name} | Size: {param.size()} | Values : {param[:2]} \n")
0 commit comments