Giter Site home page Giter Site logo

jsteng19 / mnist_neural_net Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 202 KB

This is an educational project intended to classify handwritten digits from the MNIST database using only native Python and the NumPy library. Pillow (PIL fork) was used to display the handwritten images for demonstration purposes.

Python 100.00%
mnist mnist-classification mnist-handwriting-recognition mnist-image-dataset neural-network computer-vision machine-learning numpy numpy-neuralnet-exercise

mnist_neural_net's People

Contributors

jsteng19 avatar mkandes avatar

Watchers

 avatar

mnist_neural_net's Issues

python3 only? is there a way to support both python 2 and 3 pickling simultaneously?

mkandes@castlebravo:~/Dropbox/projects/MNIST_Neural_Net$ python NeuralNetMain.py 
Traceback (most recent call last):
  File "NeuralNetMain.py", line 4, in <module>
    mnist = [pickle.load(open("mnist_train.pickle", "rb")), pickle.load(open("mnist_test.pickle", "rb"))]
  File "/usr/lib/python2.7/pickle.py", line 1384, in load
    return Unpickler(file).load()
  File "/usr/lib/python2.7/pickle.py", line 864, in load
    dispatch[key](self)
  File "/usr/lib/python2.7/pickle.py", line 892, in load_proto
    raise ValueError, "unsupported pickle protocol: %d" % proto
ValueError: unsupported pickle protocol: 3
mkandes@castlebravo:~/Dropbox/projects/MNIST_Neural_Net$ python3 NeuralNetMain.py 
Traceback (most recent call last):
  File "NeuralNetMain.py", line 1, in <module>
    import pickle, numpy
ImportError: No module named 'numpy'
mkandes@castlebravo:~/Dropbox/projects/MNIST_Neural_Net$ apt-cache policy numpy
N: Unable to locate package numpy
mkandes@castlebravo:~/Dropbox/projects/MNIST_Neural_Net$ which python
/usr/bin/python
mkandes@castlebravo:~/Dropbox/projects/MNIST_Neural_Net$ which python3
/usr/bin/python3
mkandes@castlebravo:~/Dropbox/projects/MNIST_Neural_Net$ apt-cache policy python-numpy
python-numpy:
  Installed: 1:1.11.0-1ubuntu1
  Candidate: 1:1.11.0-1ubuntu1
  Version table:
 *** 1:1.11.0-1ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status
mkandes@castlebravo:~/Dropbox/projects/MNIST_Neural_Net$ apt-cache policy python3-numpy
python3-numpy:
  Installed: (none)
  Candidate: 1:1.11.0-1ubuntu1
  Version table:
     1:1.11.0-1ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
mkandes@castlebravo:~/Dropbox/projects/MNIST_Neural_Net$ apt-get install python3-numpy
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
mkandes@castlebravo:~/Dropbox/projects/MNIST_Neural_Net$ sudo apt-get install python3-numpy
[sudo] password for mkandes: 
Sorry, try again.
[sudo] password for mkandes: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libllvm3.8 libqmi-glib1 linux-headers-4.4.0-101
  linux-headers-4.4.0-101-generic linux-headers-4.4.0-103
  linux-headers-4.4.0-103-generic linux-headers-4.4.0-104
  linux-headers-4.4.0-104-generic linux-headers-4.4.0-109
  linux-headers-4.4.0-109-generic linux-headers-4.4.0-112
  linux-headers-4.4.0-112-generic linux-headers-4.4.0-21
  linux-headers-4.4.0-21-generic linux-headers-4.4.0-72
  linux-headers-4.4.0-72-generic linux-headers-4.4.0-75
  linux-headers-4.4.0-75-generic linux-headers-4.4.0-78
  linux-headers-4.4.0-78-generic linux-headers-4.4.0-79
  linux-headers-4.4.0-79-generic linux-headers-4.4.0-81
  linux-headers-4.4.0-81-generic linux-headers-4.4.0-83
  linux-headers-4.4.0-83-generic linux-headers-4.4.0-87
  linux-headers-4.4.0-87-generic linux-headers-4.4.0-89
  linux-headers-4.4.0-89-generic linux-headers-4.4.0-91
  linux-headers-4.4.0-91-generic linux-headers-4.4.0-92
  linux-headers-4.4.0-92-generic linux-headers-4.4.0-93
  linux-headers-4.4.0-93-generic linux-headers-4.4.0-96
  linux-headers-4.4.0-96-generic linux-headers-4.4.0-97
  linux-headers-4.4.0-97-generic linux-headers-4.4.0-98
  linux-headers-4.4.0-98-generic linux-image-4.4.0-101-generic
  linux-image-4.4.0-103-generic linux-image-4.4.0-104-generic
  linux-image-4.4.0-109-generic linux-image-4.4.0-112-generic
  linux-image-4.4.0-21-generic linux-image-4.4.0-72-generic
  linux-image-4.4.0-75-generic linux-image-4.4.0-78-generic
  linux-image-4.4.0-79-generic linux-image-4.4.0-81-generic
  linux-image-4.4.0-83-generic linux-image-4.4.0-87-generic
  linux-image-4.4.0-89-generic linux-image-4.4.0-91-generic
  linux-image-4.4.0-92-generic linux-image-4.4.0-93-generic
  linux-image-4.4.0-96-generic linux-image-4.4.0-97-generic
  linux-image-4.4.0-98-generic linux-image-extra-4.4.0-101-generic
  linux-image-extra-4.4.0-103-generic linux-image-extra-4.4.0-104-generic
  linux-image-extra-4.4.0-109-generic linux-image-extra-4.4.0-112-generic
  linux-image-extra-4.4.0-21-generic linux-image-extra-4.4.0-72-generic
  linux-image-extra-4.4.0-75-generic linux-image-extra-4.4.0-78-generic
  linux-image-extra-4.4.0-79-generic linux-image-extra-4.4.0-81-generic
  linux-image-extra-4.4.0-83-generic linux-image-extra-4.4.0-87-generic
  linux-image-extra-4.4.0-89-generic linux-image-extra-4.4.0-91-generic
  linux-image-extra-4.4.0-92-generic linux-image-extra-4.4.0-93-generic
  linux-image-extra-4.4.0-96-generic linux-image-extra-4.4.0-97-generic
  linux-image-extra-4.4.0-98-generic python-lzma python-parsley python-psutil
  python-txsocksx snap-confine tor tor-geoipdb torsocks ubuntu-core-launcher
Use 'sudo apt autoremove' to remove them.
Suggested packages:
  python-numpy-doc python3-nose python3-numpy-dbg
The following NEW packages will be installed:
  python3-numpy
0 upgraded, 1 newly installed, 0 to remove and 42 not upgraded.
Need to get 1,762 kB of archives.
After this operation, 9,589 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 python3-numpy amd64 1:1.11.0-1ubuntu1 [1,762 kB]
Fetched 1,762 kB in 5s (298 kB/s)          
Selecting previously unselected package python3-numpy.
(Reading database ... 1029987 files and directories currently installed.)
Preparing to unpack .../python3-numpy_1%3a1.11.0-1ubuntu1_amd64.deb ...
Unpacking python3-numpy (1:1.11.0-1ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up python3-numpy (1:1.11.0-1ubuntu1) ...
mkandes@castlebravo:~/Dropbox/projects/MNIST_Neural_Net$ python3 NeuralNetMain.py 
accuracy: 0.109
Batch size:  150  learning constant:  1
accuracy: 0.613
mkandes@castlebravo:~/Dropbox/projects/MNIST_Neural_Net$

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.