(self, idx)
| 67 | return self.data_len |
| 68 | |
| 69 | def __getitem__(self, idx): |
| 70 | if self.cache is None: |
| 71 | self.cache = np.load(self.load_path, allow_pickle=True) |
| 72 | # mapped_idx = self.mapping[idx] |
| 73 | # cache_data = self.cache[str(mapped_idx)] |
| 74 | # print(self.cache.files) |
| 75 | cache_data = self.cache[str(idx)] |
| 76 | data = cache_data.item() |
| 77 | return data |
| 78 | |
| 79 | |
| 80 | class HumanDataset(torch.utils.data.Dataset): |