Deep Learning Visualizer
Interactive visualization of basic applications of deep learning
Loading...
Searching...
No Matches
mnist.h
Go to the documentation of this file.
1
#pragma once
2
5
#include "
models/network.h
"
6
#include "
shared/idx_matrix.h
"
7
8
#include <filesystem>
9
10
namespace
models {
11
12
class
mnist
:
public
network
{
13
public
:
14
mnist
();
15
explicit
mnist
(
const
std::filesystem::path &file_path);
16
17
void
train();
18
void
test();
19
int
predict(
const
Eigen::VectorXf &input);
20
21
private
:
22
static
const
shared::idx_matrix
&training_labels() {
23
static
shared::idx_matrix
training_labels{
"data/mnist/train-labels.idx"
};
24
return
training_labels;
25
}
26
static
const
shared::idx_matrix
&training_images() {
27
static
shared::idx_matrix
training_images{
"data/mnist/train-images.idx"
};
28
return
training_images;
29
}
30
static
const
shared::idx_matrix
&testing_labels() {
31
static
shared::idx_matrix
testing_labels{
"data/mnist/test-labels.idx"
};
32
return
testing_labels;
33
}
34
static
const
shared::idx_matrix
&testing_images() {
35
static
shared::idx_matrix
testing_images{
"data/mnist/test-images.idx"
};
36
return
testing_images;
37
}
38
};
39
40
}
// namespace models
models::mnist
Definition
mnist.h:12
models::network
Definition
network.h:15
shared::idx_matrix
Represents matrix data from an IDX file as a one dimensional vector.
Definition
idx_matrix.h:17
idx_matrix.h
network.h
src
models
mnist.h
Generated by
1.9.8