Skip to content

Commit 8dddccc

Browse files
Remove Unused Libraries and Convert to f-strings (pytorch#1802)
Co-authored-by: Holly Sweeney <[email protected]>
1 parent 1db1c1c commit 8dddccc

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

beginner_source/basics/quickstart_tutorial.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626
from torch import nn
2727
from torch.utils.data import DataLoader
2828
from torchvision import datasets
29-
from torchvision.transforms import ToTensor, Lambda, Compose
30-
import matplotlib.pyplot as plt
29+
from torchvision.transforms import ToTensor
3130

3231
######################################################################
3332
# PyTorch offers domain-specific libraries such as `TorchText <https://pytorch.org/text/stable/index.html>`_,
@@ -67,8 +66,8 @@
6766
test_dataloader = DataLoader(test_data, batch_size=batch_size)
6867

6968
for X, y in test_dataloader:
70-
print("Shape of X [N, C, H, W]: ", X.shape)
71-
print("Shape of y: ", y.shape, y.dtype)
69+
print(f"Shape of X [N, C, H, W]: {X.shape}")
70+
print(f"Shape of y: {y.shape} {y.dtype}")
7271
break
7372

7473
######################################################################

0 commit comments

Comments
 (0)