Struct rustml::datasets::MnistDigits [] [src]

pub struct MnistDigits;

This structure offers access to the MNIST database of handwritten digits.

The database that is used is available at http://yann.lecun.com/exdb/mnist/ and contains 60,000 training examples and 10,000 test examples of handwritten digits.

Currently, due to upload limits at crate.io a smaller training dataset is used with 50,000 training examples.

To be able to use the dataset please follow the instructions mentioned here.

Methods

impl MnistDigits

fn from(vectors_fname: &str, labels_fname: &str) -> Result<(Matrix<u8>, Vec<u8>), &'static str>

fn default_training_set() -> Result<(Matrix<u8>, Vec<u8>), &'static str>

Reads the default MNIST training set.

Each row of the returned matrix represents an image of size 28x28.

fn default_test_set() -> Result<(Matrix<u8>, Vec<u8>), &'static str>