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

[fix] val loader should not drop last by default. #857

Merged
merged 1 commit into from
Sep 28, 2022
Merged

[fix] val loader should not drop last by default. #857

merged 1 commit into from
Sep 28, 2022

Conversation

Fei-Wang
Copy link

@Fei-Wang Fei-Wang commented May 26, 2022

Motivation

Val loader should not drop last by default.

Modification

add 'drop_last': False in val_loader_cfg by default.

Checklist

Before PR:

  • Pre-commit or other linting tools are used to fix the potential lint issues.
  • Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests.
  • The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  • The documentation has been modified accordingly, like docstring or example tutorials.

After PR:

  • If the modification has potential influence on downstream or other related projects, this PR should be tested with those projects, like MMDet or MMSeg.
  • CLA has been signed and all committers have signed the CLA in this PR.

@Fei-Wang
Copy link
Author

@mzr1996

@Fei-Wang Fei-Wang mentioned this pull request Sep 27, 2022
2 tasks
@tonysy tonysy requested a review from mzr1996 September 27, 2022 03:12
@@ -222,6 +222,7 @@ def train_model(model,
**loader_cfg,
'shuffle': False, # Not shuffle by default
'sampler_cfg': None, # Not use sampler by default
'drop_last': False, # Not drop last by default
Copy link
Member

Choose a reason for hiding this comment

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

The default behavior of PyTorch should be drop_last=False, is this line necessary?

@mzr1996 mzr1996 changed the base branch from master to dev September 28, 2022 00:22
@mzr1996 mzr1996 merged commit 0143e5f into open-mmlab:dev Sep 28, 2022
@Fei-Wang Fei-Wang deleted the fix_val_loader_cfg branch September 28, 2022 05:59
@tonysy
Copy link
Collaborator

tonysy commented Sep 28, 2022

Thanks for your contribution. We will improve our respone SOP for community contribution. Feel free to share your ideas and comments on MMClassification.

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