Questions tagged [mnist]

MNIST is a database of handwritten digits collected by Yann Lecun and widely used in machine learning research.

MNIST is a database of handwritten digits collected by Yann Lecun, a famous computer scientist, when he was working at AT&T-Bell Labs on the problem of automation of check readings for banks. The data set is a benchmark widely used in machine learning research. Due to its small size it is also widely used for educational purposes.

Here is the full documentation for MNIST database of handwritten digits:

It is a good database for people who want to try learning techniques and pattern recognition methods on real-world data while spending minimal efforts on preprocessing and formatting.

1329 questions
6
votes
2 answers

Batch training uses sum of updates? or average of updates?

I have few questions about batch training of neural networks. First, when we update weights using batch training, the amount of change is accumulated gradients for the batch size. In this case, the amount of change is sum of the gradients? or…
Lim
  • 63
  • 3
6
votes
1 answer

How to make a Flatten filter by using MPS (MetalPerformanceShaders)?

I'm working on running CNN inference for MNIST on iOS. There is a good code sample from Apple to…
kangaroo
  • 407
  • 4
  • 19
6
votes
4 answers

How many iterations a needed to train tensorflow with the entire MNIST data set (60000 images)?

The MNIST set consists of 60,000 images for training set. While training my Tensorflow, I want to run the train step to train the model with the entire training set. The deep learning example on the Tensorflow website uses 20,000 iterations with a…
Swapnil
  • 199
  • 1
  • 2
  • 8
6
votes
3 answers

How to create 2-layers neural network using TensorFlow and python on MNIST data

I'm a newbie in machine learning and I am following tensorflow's tutorial to create some simple Neural Networks which learn the MNIST data. I have built a single layer network (following the tutotial), accuracy was about 0.92 which is ok for me. But…
Tai Christian
  • 654
  • 1
  • 10
  • 21
6
votes
1 answer

What is the structure of torch dataset?

I am beginning to use torch 7 and I want to make my dataset for classification. I've already made pixel images and corresponding labels. However, I do not know how to feed those data to the torch. I read some codes from others and found out that…
Minkyu Choi
  • 389
  • 5
  • 13
6
votes
2 answers

center of mass of pixels in grayscale image

I'm working on a program that lets the user draw a digit in a "scribbling area" and with the press of a button the application will predict the digit that he entered, using a neural net classifier. Now, to train the neural net, I used MNIST database…
cuv
  • 1,159
  • 2
  • 10
  • 20
6
votes
3 answers

cPickle.UnpicklingError: invalid load key, ' '.?

I am trying to use the mnist_data for hand written digit recognition.Now i tried this code to load the data. import cPickle import numpy as np def load_data(): f = open('G:/thesis paper/data sets/mnist.pkl.gz', 'rb') training_data,…
Setu Kumar Basak
  • 11,460
  • 9
  • 53
  • 85
6
votes
1 answer

How to create a file like the MNIST dataset

So i have a bunch of images (PNG) and their names can be used as labels. Is there a tool or an example on how i can take those images and create a dataset like the MNIST IDX one. There are a lot of examples on how to read them but no examples on how…
Andriy Lysak
  • 384
  • 5
  • 15
5
votes
2 answers

Deep Learning solution for digit recognition on natural scene

I am working on a problem, where I want to automatically read the number on images as follows: As can be seen, the images are quite challenging! Not only are these not connected lines in all cases, but also the contrast differs a lot. My first…
spadel
  • 998
  • 2
  • 16
  • 40
5
votes
2 answers

Why do i have to convert "uint8" into "float32"

I just started looking into deep learning and started to build a CNN with Keras. So I've noticed that oftentimes when the Dataset MNIST is used, after importing the images, they are getting converted to float32-Datatype. So my question is, why is…
sxeros
  • 668
  • 6
  • 21
5
votes
6 answers

Tensorflow - Value Error in model.fit - How to fix

I am trying to train a Deep Neural Network using MNIST data set. BATCH_SIZE = 100 train_data = train_data.batch(BATCH_SIZE) validation_data = validation_data.batch(num_validation_samples) test_data =…
Erdnase
  • 750
  • 3
  • 12
  • 25
5
votes
2 answers

Why would large mini batches take longer to run?

I am training an autoencoder on MNIST, and noticed that increasing the batch size after 128, starts taking more computation time on a fixed dataset size. I am using tensorflow-gpu and have GeForce GTX 1070. I tried running a couple of tests on a…
El Rakone
  • 141
  • 1
  • 12
5
votes
1 answer

How do I load MNIST data into a Google Colab Jupyter Notebook?

I've got a working environment for running Keras on Google Colab, but cannot figure out how to load MNIST data so I can import it into my program. Any suggestions greatly appreciated!
Alex V
  • 3,416
  • 2
  • 33
  • 52
5
votes
2 answers

How do I use tf.reshape()?

import tensorflow as tf import random import numpy as np x = tf.placeholder('float') x = tf.reshape(x, [-1,28,28,1]) with tf.Session() as sess: x1 = np.asarray([random.uniform(0,1) for i in range(784)]) result = sess.run(x,…
voice
  • 93
  • 1
  • 1
  • 7
5
votes
1 answer

Deskewing MNIST dataset images using minAreaRect() of opencv

I used opencv's minAreaRect to deskew the mnist digits.It worked well for most of the digits but,in some cases the minAreaRect was not detected correctly and it lead to further skewing of the digits. Images with which this code worked: Input image:…
SolitaryReaper
  • 1,823
  • 1
  • 8
  • 13