提交 38ef331e 编写于 作者: M Megvii Engine Team

Merge pull request #492 from tpoisonooo:fix-imagenet-untar

GitOrigin-RevId: e5d3a82c5290f1ba6b0ad49ba74d365ee146253b
......@@ -205,7 +205,7 @@ class ImageNet(ImageFolder):
calculate_md5(raw_file) == checksum
), "checksum mismatch, {} may be damaged".format(raw_file)
logger.info("extract valid tar file... this may take 10-20 minutes")
untar(os.path.join(self.root, raw_file), self.target_folder)
untar(raw_file, self.target_folder)
self._organize_val_data()
def _prepare_train(self):
......@@ -217,9 +217,7 @@ class ImageNet(ImageFolder):
calculate_md5(raw_file) == checksum
), "checksum mismatch, {} may be damaged".format(raw_file)
logger.info("extract train tar file.. this may take several hours")
untar(
os.path.join(self.root, raw_file), self.target_folder,
)
untar(raw_file, self.target_folder)
paths = [
os.path.join(self.target_folder, child_dir)
for child_dir in os.listdir(self.target_folder)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部