(self, idx)
| 259 | return self.size//self.batch_size |
| 260 | |
| 261 | def __getitem__(self, idx): |
| 262 | if idx >= self.__len__(): |
| 263 | raise IndexError("Index out of range") |
| 264 | if self.off_load_to_disk: |
| 265 | filepath = self._get_file_path(idx) |
| 266 | tensor = torch.load(filepath) |
| 267 | else: |
| 268 | tensor = self.data[idx] |
| 269 | return tensor |
| 270 | |
| 271 | def update_data(self, idx, new_data): |
| 272 | if self.off_load_to_disk: |
nothing calls this directly
no test coverage detected