UOMOP

trainloader image 확인 본문

Wireless Comm./Python

trainloader image 확인

Happy PinGu 2023. 6. 1. 20:51
transf = tr.Compose([tr.ToTensor(), tr.Grayscale(num_output_channels=1) ])

trainset = torchvision.datasets.CIFAR10(root='./data', train=True, download=True, transform=transf) #위에 전처리

trainloader = DataLoader(trainset, batch_size=50, shuffle=True)

for data in trainloader :

    input = data[0]

    print(type(input))
    print(input.shape)
    plt.imshow(input[0][0])

    break

Comments