Skip to content

Better set shuffle=False for the test_loader #188

Open
@iCurious-D

Description

@iCurious-D

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions