(self, db_path, transform=None, target_transform=None)
| 28 | |
| 29 | class ImageFolderLMDB(data.Dataset): |
| 30 | def __init__(self, db_path, transform=None, target_transform=None): |
| 31 | self.db_path = db_path |
| 32 | self.env = lmdb.open(db_path, subdir=osp.isdir(db_path), |
| 33 | readonly=True, lock=False, |
| 34 | readahead=False, meminit=False) |
| 35 | with self.env.begin(write=False) as txn: |
| 36 | self.length = loads_pyarrow(txn.get(b'__len__')) |
| 37 | self.keys = loads_pyarrow(txn.get(b'__keys__')) |
| 38 | |
| 39 | self.transform = transform |
| 40 | self.target_transform = target_transform |
| 41 | |
| 42 | def __getstate__(self): |
| 43 | state = self.__dict__ |
nothing calls this directly
no test coverage detected