Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improvement] Remove redundant codes in dataset.py #1584

Merged
merged 3 commits into from
Dec 8, 2021
Merged

[Improvement] Remove redundant codes in dataset.py #1584

merged 3 commits into from
Dec 8, 2021

Conversation

ucsk
Copy link
Contributor

@ucsk ucsk commented Dec 1, 2021

Delete redundant lines.

@michaelowenliu michaelowenliu changed the title Update dataset.py [Improvement] Remove redundant codes in dataset.py Dec 2, 2021
Copy link
Collaborator

@wuyefeilin wuyefeilin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

非常棒哈,但有些地方也需要同步改一下哈

@@ -75,21 +75,19 @@ def __init__(self,
self.dataset_root = dataset_root
self.transforms = Compose(transforms)
self.file_list = list()
mode = mode.lower()
self.mode = mode
self.mode = mode.lower()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果删除mode=mode.lower(), 后面使用到的mode也需要同步改成self.mode

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这是在Web端查看时发现而直接修改的,疏忽了......

另外,关于该文件我有两个注意点:

  1. {train_path, val_path, test_path} 合并成 file_path 是否会更加方便;
  2. 对于 mode='test' ,在之后的 API 中(如 evaluate/predict)均没有使用。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

非常感谢您的反馈,关于path的问题我们会进行评估哈

Copy link
Collaborator

@wuyefeilin wuyefeilin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@michaelowenliu michaelowenliu merged commit d146e2d into PaddlePaddle:develop Dec 8, 2021
@ucsk ucsk deleted the patch-1 branch December 8, 2021 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants