9 #ifndef MNIST_UTILS_HEADER
10 #define MNIST_UTILS_HEADER
20 #define MNIST_TRAINING_SET_IMAGE_FILE_NAME "./data/train-images-idx3-ubyte"
21 #define MNIST_TRAINING_SET_LABEL_FILE_NAME "./data/train-labels-idx1-ubyte"
22 #define MNIST_TESTING_SET_IMAGE_FILE_NAME "./data/t10k-images-idx3-ubyte"
23 #define MNIST_TESTING_SET_LABEL_FILE_NAME "./data/t10k-labels-idx1-ubyte"
26 #define MNIST_MAX_TRAINING_IMAGES 60000
29 #define MNIST_MAX_TESTING_IMAGES 10000
32 #define MNIST_IMG_WIDTH 28
33 #define MNIST_IMG_HEIGHT 28
Variably-sized data structure defining a vector with "count" doubles.
Definition: mnist-utils.h:53
uint8_t pixel[MNIST_IMG_WIDTH *MNIST_IMG_HEIGHT]
Definition: mnist-utils.h:66
MNIST_Label getLabelByPosition(FILE *labelFile, int position)
Definition: mnist-utils.c:202
int count
Definition: mnist-utils.h:54
Vector * getVectorFromImage(MNIST_Image *img)
Returns a Vector holding the image pixels of a given MNIST image.
Definition: mnist-utils.c:224
FILE * openMNISTLabelFile(char *fileName)
Returns a file pointer to the MNIST label file.
Definition: mnist-utils.c:119
double vals[]
Definition: mnist-utils.h:55
#define MNIST_IMG_HEIGHT
Definition: mnist-utils.h:33
MNIST_Image getImageByPosition(FILE *imageFile, int position)
Definition: mnist-utils.c:161
#define MNIST_IMG_WIDTH
Definition: mnist-utils.h:32
MNIST_Image getImage(FILE *imageFile)
Returns the next image in given MNIST image file.
Definition: mnist-utils.c:141
MNIST_Label getLabel(FILE *labelFile)
Returns the next label in given MNIST label file.
Definition: mnist-utils.c:182
FILE * openMNISTImageFile(char *fileName)
Returns a file pointer to the MNIST image file.
Definition: mnist-utils.c:95
Data block defining a MNIST image.
Definition: mnist-utils.h:65
uint8_t MNIST_Label
Definition: mnist-utils.h:41