-
Notifications
You must be signed in to change notification settings - Fork 0
/
mnist_loader.h
50 lines (43 loc) · 1.11 KB
/
mnist_loader.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef __MNIST_H
#define __MNIST_H
#include <vector>
#include <iostream>
#include <string>
#include "utils.h"
#include "Eigen/Dense"
using namespace Eigen;
class Dataset {
private:
ArrayXXc data;
ArrayXXb binary_data;
int num_rows;
int num_cols;
int img_size;
int num_images;
unsigned char thresh;
static int stopping_size;
public:
Dataset();
static int get_stop_condition();
void init_data();
void set_thresh(unsigned char);
void set_num_rows(int);
void set_num_cols(int);
void set_num_images(int);
void set_size(int);
void set_data(ArrayXXc);
void set_binary_data(ArrayXXb);
ArrayXXc get_data();
unsigned char get_thresh();
int get_num_rows();
int get_num_cols();
int get_num_images();
int get_size();
ArrayXXb get_binary_data();
void binarize_data();
Dataset* hash_dataset(HashFunc);
void read_mnist(std::string);
float compute_nice_rho(int);
};
int reverseInt(char*);
#endif