Giter Club home page Giter Club logo

python-mnist's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

python-mnist's Issues

Permission denied when trying to load training

I am trying to start a program as shown in Getting Started but face with this error:

`Traceback (most recent call last):
File "C:/Users/Stanislav/Desktop/Master/MLKR/Test.py", line 3, in
mndata.load_training()

File "C:\Anaconda2\lib\site-packages\mnist\loader.py", line 33, in load_training
os.path.join(self.path, self.train_lbl_fname))

File "C:\Anaconda2\lib\site-packages\mnist\loader.py", line 42, in load
with open(path_lbl, 'rb') as file:
IOError: [Errno 13] Permission denied: 'data/train-labels-idx1-ubyte'`

numpy output?

Would it make sense to return Numpy arrays? This would be very convenient for me and would speed up the processing modes I added with the pull request. Drawback would be the introduction of an additional library dependency. Anyways, I guess that nowadays every Python developer working with MNIST does have Numpy installed. Numpy could also be imported only on-demand (with an if statement), in order to avoid the mandatory dependency. Thoughts?

MNIST download file formats

Using get_data.sh to wget then gunzip delivers the required format e.g. t10k-images-idx3-ubyte, etc. However going to http://yann.lecun.com/exdb/mnist/ and downloading the .gz files, then using say 7-zip open archive gives t10k-images.idx3-ubyte etc, which natrually throws a file not found execption. The workround is of course to rename to t10k-images-idx3-ubyte, etc. It would be useful to add this warning to the README. Thanks,

ReadMe modifications

hi there, great package and thanks for your contribution.

only one tiny suggestion

In the last lines of readme file, perhaps it is better suggesting
**
images, labels = mndata.load_training() # list of images and labels
**

instead of
**
mndata.load_training() # the first time I run it, my screen went crazy with numbers jumping around.
**
Also comment out the data type of each one.

again, thank you!

Please include this in conda

Please include this package in the Conda repo- I'm using this with PyTorch, and PyTorch requires Conda when built from source.

EMNIST support

Hey,
I've tried this library with EMNIST Dataset. It works quite nice with one issue, loader for testing data returns 1 for every class. I know, that this implementation has been made only for MNIST, but anyway it could be a really nice improvement for this library. Please consider this and let me know, maybe I can help with implementation ;)

Good job anyway!

Loading to numpy array is slow

If I load the full data with result_type of 'numpy', it takes over 4 seconds. I can get it down to around half a second with the following approach, which I'm not going to make into a pull request because it would require refactoring the surrounding class. Just thinking it'd be nice to share what I found.

In mnist/loader.py, the load method, instead of images, return np.array(image_data).reshape((size, rows*cols)) (and don't create the images list). In other words, instead of creating thousands of small numpy arrays, create just one array with one more dimension, directly on the byte array read from the file.

Cannot import MNIST

from mnist import MNIST
when executing this line it shows

cannot import name 'MNIST'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.