powered by
Opens the MNIST training data and label files (not provided with package) and extracts the images and labels and returns them in a list
extractMNIST(data,labels,s,centercrop=TRUE)
String of path to file containing MNIST training images
String of path to file containing MNIST training labels
Number of samples and labels to extract from file
Boolean indicating whether the images should be centercropped to contain only 256 points
List containing matrix of image data and array of training labels
# NOT RUN { # } # NOT RUN { extractMNIST("train-images.idx3-ubyte","train-labels.idx1-ubyte",2) # }
Run the code above in your browser using DataLab