-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Conversation
Delete redundant lines.
There was a problem hiding this 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() |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这是在Web端查看时发现而直接修改的,疏忽了......
另外,关于该文件我有两个注意点:
- 将
{train_path, val_path, test_path}
合并成file_path
是否会更加方便; - 对于
mode='test'
,在之后的 API 中(如evaluate/predict
)均没有使用。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
非常感谢您的反馈,关于path的问题我们会进行评估哈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Delete redundant lines.