Skip to content
New issue

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

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

Already on GitHub? # to your account

Wrong return value in train_test_data function #6

Open
ham45X13y opened this issue Jan 7, 2025 · 0 comments
Open

Wrong return value in train_test_data function #6

ham45X13y opened this issue Jan 7, 2025 · 0 comments

Comments

@ham45X13y
Copy link

In the pytorch_mebeauty_dataset.py file in the function train_test_data() there is a mix up with test and training data. There are two issues. One is the testloader data that is provided and the other is the return value that is provided. This is the current code:

train_data = MEBeauty(root_dir, train_scores,test_scores, train = True, transform = transform_train)
    trainloader = torch.utils.data.DataLoader(train_data, batch_size = batch, shuffle =True, num_workers = num_workers, pin_memory = pin_memory)
    test_data = MEBeauty(root_dir, train_scores,test_scores, train = False, transform = transform_test)
    testloader = torch.utils.data.DataLoader(train_data , batch_size = batch, shuffle =True, num_workers = num_workers, pin_memory = pin_memory)

    return trainloader, trainloader

That I assume should be:

train_data = MEBeauty(root_dir, train_scores,test_scores, train = True, transform = transform_train)
    trainloader = torch.utils.data.DataLoader(train_data, batch_size = batch, shuffle =True, num_workers = num_workers, pin_memory = pin_memory)
    test_data = MEBeauty(root_dir, train_scores,test_scores, train = False, transform = transform_test)
    testloader = torch.utils.data.DataLoader(test_data, batch_size = batch, shuffle =True, num_workers = num_workers, pin_memory = pin_memory)

    return trainloader, testloader

Can someone verfiy if this is an actual issue or if this is done on purpose?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant