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

Should this line be self.transforms.set_mode("train")? #3

Closed
ElviraLL opened this issue Sep 12, 2023 · 1 comment
Closed

Should this line be self.transforms.set_mode("train")? #3

ElviraLL opened this issue Sep 12, 2023 · 1 comment

Comments

@ElviraLL
Copy link

@gorodnitskiy
Copy link
Owner

gorodnitskiy commented Nov 30, 2023

Thank you for bringing up this issue!

You're correct that TransformsWrapper should be set up to apply transformations for training. However, this code specified only for testing. I am using the MNIST dataset which includes separate train and test sets, and then I concatenate these sets for splitting them into new train, validation, and test sets, which required for testing of different code parts (see more in tests/). So, in this context, the exact mode of TransformsWrapper is not critical in MNISTDataModule class, as the transformations applied to the initial MNIST sets are the same (see more in configs/datamodule/mnist.yaml) due to further splitting.

I realize that this might not be clear from the code. To improve clarity, I added a comment explaining why the same transformations are used, and changed the mode name to "train". I hope it will help avoid any misunderstanding.

The main logic of DataModule in this pipeline could be seen in src/datamodules/datamodules.py. MNISTDataModule is used just for testing.

Thank you for your contribution to improving the quality and clarity of this project. If you have any further questions or suggestions, feel free to share!

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