Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read lmdb file #30

Open
jS5t3r opened this issue May 10, 2023 · 0 comments
Open

read lmdb file #30

jS5t3r opened this issue May 10, 2023 · 0 comments

Comments

@jS5t3r
Copy link

jS5t3r commented May 10, 2023

from folder2lmdb import ImageFolderLMDB
from torch.utils.data import DataLoader
from torchvision.transforms import transforms
import torchvision

dir_folder = "/home/DATA//lsun/church/church_outdoor_train_lmdb/data.mdb"

transform = transforms.Compose([
    transforms.ToTensor(),
])

dataset = ImageFolderLMDB(dir_folder, transform, transform) # <--- error is here
loader = DataLoader(dataset, batch_size=64)

Error

     31     # self.length = pa.deserialize(txn.get(b'__len__'))
     32     # self.keys = txn.stat().keys()
---> 33     self.keys = pa.deserialize(txn.get(b'__keys__'))

TypeError: a bytes-like object is required, not 'NoneType'
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

No branches or pull requests

1 participant