Last active
May 16, 2020 03:33
-
-
Save udithhaputhanthri/fa8ad91b2a422d94da42bd35c7197c84 to your computer and use it in GitHub Desktop.
Introduction to DCGAN using PyTorch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import zipfile | |
!mkdir data_faces && wget https://s3-us-west-1.amazonaws.com/udacity-dlnfd/datasets/celeba.zip | |
with zipfile.ZipFile("celeba.zip","r") as zip_ref: | |
zip_ref.extractall("data_faces/") | |
from torch.utils.data import DataLoader | |
transform = transforms.Compose([ | |
transforms.Resize((img_size,img_size)), | |
transforms.ToTensor()]) | |
dataset = datasets.ImageFolder('data_faces', transform=transform) | |
data_loader = DataLoader(dataset,batch_size=batch_size,shuffle=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment