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
128
votes
4 answers

How to unpack pkl file?

I have a pkl file from MNIST dataset, which consists of handwritten digit images. I'd like to take a look at each of those digit images, so I need to unpack the pkl file, except I can't find out how. Is there a way to unpack/unzip pkl file?
ytrewq
  • 3,670
  • 9
  • 42
  • 71
58
votes
8 answers

Extract images from .idx3-ubyte file or GZIP via Python

I have created a simple function for facerecognition by using the facerecognizer from OpenCV. It works all fine with images from people. Now I would like to make a test by using handwritten characters instead of people. I came across MNIST dataset,…
Roman
  • 3,563
  • 5
  • 48
  • 104
53
votes
10 answers

Tensorflow crashes with CUBLAS_STATUS_ALLOC_FAILED

I'm running tensorflow-gpu on Windows 10 using a simple MINST neural network program. When it tries to run, it encounters a CUBLAS_STATUS_ALLOC_FAILED error. A google search doesn't turn up anything. I…
Axiverse
  • 1,589
  • 3
  • 14
  • 30
40
votes
1 answer

Should I use softmax as output when using cross entropy loss in pytorch?

I have a problem with classifying fully connected deep neural net with 2 hidden layers for MNIST dataset in pytorch. I want to use tanh as activations in both hidden layers, but in the end, I should use softmax. For the loss, I am choosing…
pikachu
  • 690
  • 1
  • 6
  • 17
39
votes
15 answers

import input_data MNIST tensorflow not working

TensorFlow MNIST example not running with fully_connected_feed.py I checked this out and realized that input_data was not built-in. So I downloaded the whole folder from here. How can I start the tutorial: import input_data mnist =…
O.rka
  • 29,847
  • 68
  • 194
  • 309
28
votes
12 answers

ModuleNotFoundError: No module named 'tensorflow.examples'

When I import tensorflow import tensorflow as tf I don't get an error. However, I do get the error below. I'm using spyder if that helps. As per other questions, I ensured up to date (v1.8) tensorflow using both conda and then pip installs. This…
alwayscurious
  • 1,155
  • 1
  • 8
  • 18
21
votes
3 answers

TensorFlow create dataset from numpy array

TensorFlow as build it a nice way to store data. This is for example used to store the MNIST data in the example: >>> mnist .DataSets object at 0x10f930630> Suppose to have a…
Donbeo
  • 17,067
  • 37
  • 114
  • 188
20
votes
3 answers

TypeError: only integer scalar arrays can be converted to a scalar index

I am trying a simple demo code of tensorflow from github link. I'm currently using python version 3.5.2 Z:\downloads\tensorflow_demo-master\tensorflow_demo-master>py Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit…
Suraksha Ajith
  • 872
  • 2
  • 12
  • 23
20
votes
6 answers

TensorFlow - Show image from MNIST DataSet

I'm trying to learn TensorFlow and I implemented the MNIST example from the the following link: http://openmachin.es/blog/tensorflow-mnist I want to be able to actually view the training/test images. So I'm trying to add code that will show the…
JonyK
  • 585
  • 2
  • 7
  • 12
19
votes
2 answers

Tensorflow Deep MNIST: Resource exhausted: OOM when allocating tensor with shape[10000,32,28,28]

This is the sample MNIST code I am running: from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets('MNIST_data', one_hot=True) import tensorflow as tf sess = tf.InteractiveSession() x =…
Abhijay Ghildyal
  • 4,044
  • 6
  • 33
  • 54
18
votes
2 answers

Tensorflow model for OCR

I am new in Tensorflow and I am trying to build model which will be able to perform OCR on my images. I have to read 9 characters (fixed in all images), numbers and letters. My model would be similar to this…
thug_
  • 893
  • 2
  • 11
  • 31
18
votes
2 answers

python pickle UnicodeDecodeError

I'm trying to load the mnist character dataset (following the tutorial outlined here: http://neuralnetworksanddeeplearning.com/chap1.html ) when I run the load_data_wrapper function I get the error. UnicodeDecodeError: 'ascii' codec can't decode…
18
votes
3 answers

Visualize MNIST dataset using OpenCV or Matplotlib/Pyplot

i have MNIST dataset and i am trying to visualise it using pyplot. The dataset is in cvs format where each row is one image of 784 pixels. i want to visualise it in pyplot or opencv in the 28*28 image format. I am trying directly using…
decipher
  • 498
  • 2
  • 4
  • 16
17
votes
1 answer

RuntimeError: output with shape [1, 224, 224] doesn't match the broadcast shape [3, 224, 224]

This is the error i get when I try to train my network. The class we used to store Images from the Caltech 101 dataset was provided us by our teachers. from torchvision.datasets import VisionDataset from PIL import Image import os import…
Giorgio Maritano
  • 341
  • 1
  • 3
  • 12
17
votes
1 answer

Output and Broadcast shape mismatch in MNIST, torchvision

I am getting following error when using MNIST dataset in Torchvision RuntimeError: output with shape [1, 28, 28] doesn't match the broadcast shape [3, 28, 28] Here is my code: import torch from torchvision import datasets, transforms transform =…
Jibin Mathew
  • 4,816
  • 4
  • 40
  • 68
1
2 3
88 89