-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Hi, I was referring to the dataloader code for imagenet32. Upon visualizing the validation set, I am getting weird images.
Visualizing Code
transform = transforms.Compose([
transforms.ToTensor()
])
d = ImageNet32(root = '.', train=False, transform = transform)
val_loader = torch.utils.data.DataLoader(d, batch_size=16, shuffle=False)
def imshow(img):
npimg = img.numpy()
plt.figure(figsize = (10, 10))
plt.imshow(np.transpose(npimg, (1, 2, 0)))
plt.show()
dataiter = iter(val_loader)
images, labels = next(dataiter)
imshow(torchvision.utils.make_grid(images))
Either i'm mistaking somewhere in the visualization, or the dataloader is not reading the npz correctly.
Can you please help resolve this?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
