Skip to content

Conversation

@nnh12
Copy link

@nnh12 nnh12 commented Nov 19, 2024

The script train_vae.py failed with a FileNotFoundError while initializing the ImageFolder dataset due to the absence of class folder strucuture. This PR change correctly moves the images to the correct image directory.

nathan:~/new/DALLE-pytorch$ python3 train_vae.py --image_folder ~/new/DALLE-pytorch/images
Traceback (most recent call last):
  File "/home/nathan/new/DALLE-pytorch/train_vae.py", line 113, in <module>
    ds = ImageFolder(
  File "/home/nathan/.local/lib/python3.10/site-packages/torchvision/datasets/folder.py", line 328, in __init__
    super().__init__(
  File "/home/nathan/.local/lib/python3.10/site-packages/torchvision/datasets/folder.py", line 149, in __init__
    classes, class_to_idx = self.find_classes(self.root)
  File "/home/nathan/.local/lib/python3.10/site-packages/torchvision/datasets/folder.py", line 234, in find_classes
    return find_classes(directory)
  File "/home/nathan/.local/lib/python3.10/site-packages/torchvision/datasets/folder.py", line 43, in find_classes
    raise FileNotFoundError(f"Couldn't find any class folder in {directory}.")
FileNotFoundError: Couldn't find any class folder in /home/nathan/new/DALLE-pytorch/images.

@nnh12 nnh12 changed the title Fix Class Directory Error from Image Folder in 'train_vae.py' Training Script [Bug Fix]: Correct Image Folder Structure for train_vae.py Training Script Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant