Using the MNIST Dataset
From Ufldl
(Created page with "=== Introduction === The MNIST dataset is a dataset of handwritten digits, comprising 60 000 training exmaples and 10 000 test examples. The dataset can be downloaded from http:...") |
|||
Line 57: | Line 57: | ||
As an example of how to use these functions, you can check the images and labels using the following code: | As an example of how to use these functions, you can check the images and labels using the following code: | ||
<syntaxhighlight> | <syntaxhighlight> | ||
+ | % Change the filenames if you've saved the files under different names | ||
images = loadMNISTImages('train-images-idx3-ubyte'); | images = loadMNISTImages('train-images-idx3-ubyte'); | ||
labels = loadMNISTLabels('train-labels-idx1-ubyte'); | labels = loadMNISTLabels('train-labels-idx1-ubyte'); | ||
- | % | + | % We are using display_network from the autoencoder code |
display_network(reshape(images,28 * 28,[])); | display_network(reshape(images,28 * 28,[])); | ||
disp(labels(1:10)); | disp(labels(1:10)); | ||
</syntaxhighlight> | </syntaxhighlight> |