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

Better set shuffle=False for the test_loader #188

Open
iCurious-D opened this issue Dec 10, 2024 · 0 comments
Open

Better set shuffle=False for the test_loader #188

iCurious-D opened this issue Dec 10, 2024 · 0 comments

Comments

@iCurious-D
Copy link

As I work through the .py files in Machine-Learning-Collection/tree/master/ML/Pytorch/Basics,
I noticed that most of them, when creating the test_loader, the shuffle parameter is set to true.
train_loader = DataLoader(dataset=train_dataset, batch_size=batch_size, shuffle=True)
test_loader = DataLoader(dataset=test_dataset, batch_size=batch_size, shuffle=True)

But for the test_loader, it is generally better not to use shuffle=True.
Not shuffling the test data makes it easier to track and understand the model's performance.
For instance, if you are reviewing predictions for specific samples, a fixed order allows you to locate these samples more conveniently.

Thank you for your amazing job, really learnt a lot from this repo.

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

No branches or pull requests

1 participant