"...monomer/git@developer.sourcefind.cn:OpenDAS/openfold.git" did not exist on "3bec3e9b2d1e8bdb83887899102eff7d42dc2ba9"
Commit 7ef14309 authored by Shaoshuai Shi's avatar Shaoshuai Shi
Browse files

support merge_all_iters_to_one_epoch in NuScenes

parent 9157ee44
...@@ -107,9 +107,15 @@ class NuScenesDataset(DatasetTemplate): ...@@ -107,9 +107,15 @@ class NuScenesDataset(DatasetTemplate):
return points return points
def __len__(self): def __len__(self):
if self._merge_all_iters_to_one_epoch:
return len(self.infos) * self.total_epochs
return len(self.infos) return len(self.infos)
def __getitem__(self, index): def __getitem__(self, index):
if self._merge_all_iters_to_one_epoch:
index = index % len(self.infos)
info = copy.deepcopy(self.infos[index]) info = copy.deepcopy(self.infos[index])
points = self.get_lidar_with_sweeps(index, max_sweeps=self.dataset_cfg.MAX_SWEEPS) points = self.get_lidar_with_sweeps(index, max_sweeps=self.dataset_cfg.MAX_SWEEPS)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment