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

download parameter of MovingMNIST() should be explained before transform parameter #8789

Open
hyperkai opened this issue Dec 8, 2024 · 1 comment

Comments

@hyperkai
Copy link

hyperkai commented Dec 8, 2024

📚 The doc issue

The doc of MovingMNIST() says that download parameter is before transform parameter as shown below:

class torchvision.datasets.MovingMNIST(root: Union[str, Path], split: Optional[str] = None, split_ratio: int = 10, download: bool = False, transform: Optional[Callable] = None)

But download parameter is explained after transform parameter as shown below:

Parameters
...

  • split_ratio (int, optional) – The split ratio of number of frames. If split="train", the first split frames data[:, :split_ratio] is returned. If split="test", the last split frames data[:, split_ratio:] is returned. If split=None, this parameter is ignored and the all frames data is returned.
  • transform (callable, optional) – A function/transform that takes in a torch Tensor and returns a transformed version. E.g, transforms.RandomCrop
  • download (bool, optional) – If true, downloads the dataset from the internet and puts it in root directory. If dataset is already downloaded, it is not downloaded again.

Suggest a potential alternative/fix

So download parameter should be explained before transform parameter as shown below:

Parameters
...

  • split_ratio (int, optional) – The split ratio of number of frames. If split="train", the first split frames data[:, :split_ratio] is returned. If split="test", the last split frames data[:, split_ratio:] is returned. If split=None, this parameter is ignored and the all frames data is returned.
  • download (bool, optional) – If true, downloads the dataset from the internet and puts it in root directory. If dataset is already downloaded, it is not downloaded again.
  • transform (callable, optional) – A function/transform that takes in a torch Tensor and returns a transformed version. E.g, transforms.RandomCrop
@NicolasHug
Copy link
Member

Thanks for the report @hyperkai , please feel free to submit a PR

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