Skip to content

Add description for Dataset objects #384

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

Merged
merged 2 commits into from
Jan 4, 2018
Merged

Add description for Dataset objects #384

merged 2 commits into from
Jan 4, 2018

Conversation

vishwakftw
Copy link
Contributor

This closes #383.

Currently this is how it is displayed (for MNIST). Please let me know what you think.

>>> import torchvision as tv
>>> transform = tv.transforms.Compose([tv.transforms.ToTensor(), tv.transforms.Normalize((0.5,), (0.5,))])
>>> tv.datasets.MNIST(root='./MNIST_data', transform=transform, target_transform=transform)
Dataset MNIST
    Number of datapoints: 60000
    Split: train
    Root Location: ./MNIST_data
    Transforms (if any): Compose(
                             ToTensor()
                             Normalize(mean=(0.5, 0.5), std=(0.5, 0.5))
                         )
    Target Transforms (if any): Compose(
                                    ToTensor()
                                    Normalize(mean=(0.5, 0.5), std=(0.5, 0.5))
                                )

@vishwakftw vishwakftw changed the title [WIP] Add description for Datasets Add description for Dataset objects Jan 4, 2018
@vishwakftw
Copy link
Contributor Author

Is it possible to test __repr__()? I found no test files available, and I think it would be hard to test without downloading, I believe.

@soumith
Copy link
Member

soumith commented Jan 4, 2018

tests are here: https://github.com/pytorch/vision/blob/master/test/test_transforms.py

Just call repr inside this file for each transform and that should be sufficient as a smoke test

@vishwakftw
Copy link
Contributor Author

Oh, I am sorry. I meant the __repr()__ for the Dataset objects. The tests for transforms objects have been added already.

@soumith
Copy link
Member

soumith commented Jan 4, 2018

oh i see, yea no good way to test these things. it's fine for now.

@soumith soumith merged commit 7044049 into pytorch:master Jan 4, 2018
@vishwakftw vishwakftw deleted the dataset-describe branch January 6, 2018 03:41
rajveerb pushed a commit to rajveerb/vision that referenced this pull request Nov 30, 2023
* [BERT] Update files to run with TF2.2RC0 build on multiple V100s

* [BERT] fix eval dataset to always from beginning of dataset

* [BERT] only manually increase step counter when using AdamW optimizer
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

Successfully merging this pull request may close these issues.

[Feature Request] Adding Descriptions for Dataset objects
2 participants