Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upDownload and decompress mnist #273
Conversation
| if not existsFile(imgsPath): | ||
| raise newException(IOError, "MNIST images file \"" & imgsPath & "\" does not exist") | ||
|
|
||
| let stream = newGzFileStream(imgsPath, mode = fmRead) |
This comment has been minimized.
This comment has been minimized.
mratsim
Sep 4, 2018
Owner
Does newGzFileStream also works for uncompressed files?
If no I'd like to have a if uncompressed
This comment has been minimized.
This comment has been minimized.
metasyn
Sep 5, 2018
Author
Contributor
I think it assumes its compressed:
https://github.com/nim-lang/zip/blob/master/zip/gzipfiles.nim#L61
| result.test_images = read_mnist_images(tmp_files[2]) | ||
| result.test_labels = read_mnist_labels(tmp_files[3]) | ||
|
|
||
| delete_mnist_files(tmp_files) |
This comment has been minimized.
This comment has been minimized.
mratsim
Sep 4, 2018
Owner
MNIST is small but I guess for heavy datasets we should provide a way to save permanently and to manage the cached datasets and ML models
This comment has been minimized.
This comment has been minimized.
|
|
||
| suite "Datasets - MNIST": | ||
| test "Load MNIST": | ||
| let mnist = load_mnist() |
This comment has been minimized.
This comment has been minimized.
mratsim
Sep 4, 2018
•
Owner
mmmh, I have to figure out a way to cache that for CI, I don't think it's cool to download that every commit.
This comment has been minimized.
This comment has been minimized.
metasyn
Sep 5, 2018
Author
Contributor
I changed this to cache by default in .cache/arraymancer/ - I also added .cache to appveyor
|
I think it still doesn't support local files. I missed something earlier btw, the following files should be changed to use the new downloading mechanism: Arraymancer/examples/ex02_handwritten_digits_recognition.nim Lines 17 to 32 in de678ac Thank you! |
|
Seems good, thank you! |
mratsim
mentioned this pull request
mratsim
mentioned this pull request

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

metasyn commentedSep 4, 2018
Fixes #168
Let me know if you'd like things changed, of course :)