Skip to content

Commit 5c891c8

Browse files
committed
Update utils_cifar.py
1 parent 84b08fd commit 5c891c8

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

pytorch_script_mode_local_training_and_serving/utils_cifar.py

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import torch
22
import torchvision
33
import torchvision.transforms as transforms
4-
import matplotlib.pyplot as plt
5-
import numpy as np
4+
65

76
classes = ('plane', 'car', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck')
87

@@ -27,10 +26,3 @@ def get_test_data_loader(download):
2726
download=download, transform=transform)
2827
return torch.utils.data.DataLoader(testset, batch_size=4,
2928
shuffle=False, num_workers=2)
30-
31-
32-
# function to show an image
33-
def imshow(img):
34-
img = img / 2 + 0.5 # unnormalize
35-
npimg = img.numpy()
36-
plt.imshow(np.transpose(npimg, (1, 2, 0)))

0 commit comments

Comments
 (0)