Files
jens 7b34529b24 imported RBM
git-svn-id: http://moon:8086/svn/matlab/trunk@91 801c6759-fa7c-4059-a304-17956f83a07c
2016-07-12 11:24:12 +00:00

15 lines
639 B
Matlab

function [data_train, labels_train, data_test, labels_test] = load_preprocess_mnist()
%% TODO ensure this is consistent with common loaders
% assumes relative paths to the common directory
% assumes common directory on paty for access to load functions
% adds 1 to the labels to make them 1-indexed
data_train = loadMNISTImages('../common/train-images-idx3-ubyte');
labels_train = loadMNISTLabels(['../common/train-labels-idx1-ubyte']);
labels_train = labels_train + 1;
data_test = loadMNISTImages('../common/t10k-images-idx3-ubyte');
labels_test = loadMNISTLabels(['../common/t10k-labels-idx1-ubyte']);
labels_test = labels_test + 1;