Giter VIP home page Giter VIP logo

Comments (3)

GanGral avatar GanGral commented on May 26, 2024 3

I see couple of ways of fixing issue:

  • bring back mnist.pkl.gz to the repository (since it's missing currently) and make sure accessing fields by strings works there
  • change to code to access data using integers, not strings (this seem to work):

print(MNIST[0][0][0][130:180])
print(MNIST[0][1][0])
features = MNIST[0][0].astype(np.float32) / 256.0
labels = MNIST[0][1]
fig = pylab.figure(figsize=(10,5))
for i in range(10):
ax = fig.add_subplot(1,10,i+1)
pylab.imshow(features[i].reshape(28,28))
pylab.show()

from ai-for-beginners.

cutePanda123 avatar cutePanda123 commented on May 26, 2024 2

i fixed the 'ascii' code error by specifying the encoding parameter: MNIST = pickle.load(mnist_pickle, encoding='latin1')

link to the commit: cutePanda123@a73db3c

from ai-for-beginners.

GanGral avatar GanGral commented on May 26, 2024

additional info:

mnist.pkl.gz is not available in the original location, so I downloaded it from
https://github.com/mnielsen/neural-networks-and-deep-learning/blob/master/data/mnist.pkl.gz

I assume the data is structured differently in this file.

from ai-for-beginners.

Related Issues (20)

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.