Skip to content

Instantly share code, notes, and snippets.

@MLWhiz
Last active September 7, 2020 15:03
Show Gist options
  • Select an option

  • Save MLWhiz/0e9bcc85366595586c005e3fc28f310a to your computer and use it in GitHub Desktop.

Select an option

Save MLWhiz/0e9bcc85366595586c005e3fc28f310a to your computer and use it in GitHub Desktop.
t = transforms.Compose([
transforms.Resize(size=256),
transforms.CenterCrop(size=224),
transforms.ToTensor()])
train_dataset = customImageFolderDataset(root=traindir,transform=t)
train_dataloader = DataLoader(train_dataset,batch_size = 64, shuffle=True, num_workers=10)
for image_batch, label_batch in train_dataloader:
pred = myImageNeuralNet(image_batch)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment