Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@KennyKang7012
KennyKang7012 / pytorch_image_folder_with_file_paths.py
Last active February 27, 2024 09:26 — forked from andrewjong/pytorch_image_folder_with_file_paths.py
PyTorch Image File Paths With Dataset Dataloader
import torch
import torchvision
from torchvision import datasets, transforms
transforms = transforms.Compose([
transforms.Resize((64,64)),
transforms.ToTensor()
])
class ImageFolderWithPaths(torchvision.datasets.ImageFolder)):