-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
create own MNIST dataset #942
Comments
reimplementing the MNIST class would also require to reimplement the torchvision.transforms, at least |
yes, it shall be simple... :] |
i don't know if we need to reimplement. https://pytorch.org/docs/stable/_modules/torchvision/datasets/mnist.html#MNIST [docs]class MNIST(VisionDataset):
"""`MNIST <http://yann.lecun.com/exdb/mnist/>`_ Dataset.
Args:
root (string): Root directory of dataset where ``MNIST/processed/training.pt``
and ``MNIST/processed/test.pt`` exist.
train (bool, optional): If True, creates dataset from ``training.pt``,
otherwise from ``test.pt``.
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 an PIL image
and returns a transformed version. E.g, ``transforms.RandomCrop``
target_transform (callable, optional): A function/transform that takes in the
target and transforms it.
"""
resources = [
("http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz", "f68b3c2dcbeaaa9fbdd348bbdeb94873"),
("http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz", "d53e105ee54ea40749a09fcbcd1e9432"),
("http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz", "9fb629c4189551a2d022fa330f9573f3"),
("http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz", "ec29112dd5afa0611ce80d1b7f02629c")
] |
or override the download method and insert our urls. |
I thought this is about getting rid of the torchvision dependency :) |
oooo. it could be i guess haha. I thought we were trying to cache MNIST :) |
there were two parallel things
|
Have already looked into it a bit. I think I can do the custom MNIST class and drop torchvision dep. Unless you already started @Borda |
That would be GREAT, cool! Looking forward to seeing it 🤖 |
mnist is only needed for tests no? why not drop the dep but keep it as a test dep? |
yes it only needed for tests. |
I just found an issue: some tests run the pl_examples and there it imports torchvision. If we want to drop torchvision, we would also have to do it for the examples or not test the examples. Not sure about this ... doesn't seem to be as straightforward as I thought. |
As we want testing for each |
I'm kinda stuck here. Here is where we are:
We don't want to replace the torchvision MNIST in the examples with our custom one, because users will not know about it. |
update: I think I have found a way to mock the import without touching the pl_examples. |
Great work! By my opinion we do not test examples on all python/pytorch/OS versions since they are not really executed (it would take really long time) |
it seems that |
🚀 Feature
We shall get free of
torchvision
even in tests we wound be impacted by they optional crashesMotivation
for example
torchvision
is not on pip for python 3.8also particular
torchvision
enforcetorch
versionsPitch
we reimplement MNIST dataset and class downloading data from own web
Extensions:
Additional context
discussed in #859 and #917 and #917 (comment)
Resources:
The text was updated successfully, but these errors were encountered: