pytorch / vision

Datasets, Transforms and Models specific to Computer Vision
https://pytorch.org/vision
BSD 3-Clause "New" or "Revised" License
16.33k stars 6.97k forks source link

Setting `["bridge_train"]` to `classes` argument of `LSUN()` gets error #8768

Open hyperkai opened 2 days ago

hyperkai commented 2 days ago

🐛 Describe the bug

Setting ["bridge_train"] to classes argument of LSUN() gets the error as shown below: *Memos:

from torchvision import datasets

train_data = datasets.LSUN(
    root="C:/Users/<user>/dl-models/data/lsun",
    classes=["bridge_train"] # Here
) # Error

print(len(train_data))

CorruptedError: mdb_cursor_get: MDB_CORRUPTED: Located page was wrong type

Versions

import torchvision

torchvision.__version__ # '0.20.1'
NicolasHug commented 2 days ago

Hi @hyperkai Can you please provide the entire traceback? It might help diagnose what's going on. As mentioned in https://github.com/pytorch/vision/issues/8767#issuecomment-2507945632 it's hard to repro as the original files aren't available anymore