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

Use custom dataset #2

Closed
Yahya222 opened this issue Nov 1, 2021 · 1 comment
Closed

Use custom dataset #2

Yahya222 opened this issue Nov 1, 2021 · 1 comment

Comments

@Yahya222
Copy link

Yahya222 commented Nov 1, 2021

Hello,
Thank you for this code it is really helpful. I have a question is it possible to use the same code with custom dataset?
If so please tell me what to change.
Best regards

@htwang14
Copy link
Contributor

htwang14 commented Nov 4, 2021

Yes, you can use AugMax on your own dataset, as long as the augmentations make sense on it.
For implementation, you need to:

  1. Create a file named your_dataset_name.py under AugMax/dataloaders
  2. Define your own dataset class as an inheritance of torch.utils.data.Dataset in your_dataset_name.py. Here is an official tutorial from PyTorch on how to do it.
  3. Write the dataloader code for your own dataset in your_dataset_name.py. You can take my CIFAR10 dataloader as an example.
  4. Import your own dataloader function and load data as I did for CIFAR10 in augmax_training_ddp.py.

@htwang14 htwang14 closed this as completed Nov 5, 2021
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

2 participants