shark::MNIST Class Reference

Reads in the famous MNIST data in possibly binarized form. The MNIST database itself is not included in Shark, this class just helps loading it. More...

#include <shark/Unsupervised/RBM/Problems/MNIST.h>

Public Member Functions

 MNIST (std::string filename, char threshold=127, std::size_t batchSize=256)
 
UnlabeledData< RealVector > data () const
 
std::size_t inputDimension () const
 
std::size_t batchSize () const
 

Detailed Description

Reads in the famous MNIST data in possibly binarized form. The MNIST database itself is not included in Shark, this class just helps loading it.

MNIST is a set of handwritten digits. It needs the filename of the file containing the database (can be downloaded form the web) and the threshold for binarization. The threshold (between 0 and 255) describes when a gray value will be interpreted as 1. Default is 127. If the threshold is 0, no binarization takes place.

Definition at line 47 of file MNIST.h.

Constructor & Destructor Documentation

◆ MNIST()

shark::MNIST::MNIST ( std::string  filename,
char  threshold = 127,
std::size_t  batchSize = 256 
)
inline

Definition at line 101 of file MNIST.h.

Member Function Documentation

◆ batchSize()

std::size_t shark::MNIST::batchSize ( ) const
inline

Definition at line 117 of file MNIST.h.

◆ data()

UnlabeledData<RealVector> shark::MNIST::data ( ) const
inline

Definition at line 107 of file MNIST.h.

◆ inputDimension()

std::size_t shark::MNIST::inputDimension ( ) const
inline

Definition at line 112 of file MNIST.h.


The documentation for this class was generated from the following file: