提交 42a44536 编写于 作者: L LielinJiang

support dict dataset

上级 ac794a9c
......@@ -97,7 +97,7 @@ class DictDataLoader():
if isinstance(indexs, paddle.Variable):
indexs = indexs.numpy()
current_items = []
items = getattr(self.dataset, key)
items = self.dataset.non_tensor_dict[key]
for index in indexs:
current_items.append(items[index])
......@@ -105,7 +105,6 @@ class DictDataLoader():
return current_items
def build_dataloader(cfg, is_train=True):
dataset = DATASETS.get(cfg.name)(cfg)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册