提交 7bdce56e 编写于 作者: W wuzewu

Fix path error

上级 250df1ca
...@@ -74,7 +74,8 @@ class ImageClassificationDataset(object): ...@@ -74,7 +74,8 @@ class ImageClassificationDataset(object):
def label_dict(self): def label_dict(self):
if not self.label_list: if not self.label_list:
with open(self.label_list_file, "r") as file: with open(os.path.join(self.base_path, self.label_list_file),
"r") as file:
self.label_list = file.read().split("\n") self.label_list = file.read().split("\n")
return {index: key for index, key in enumerate(self.label_list)} return {index: key for index, key in enumerate(self.label_list)}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册