-
Notifications
You must be signed in to change notification settings - Fork 1
/
loadmnistdialog.h
53 lines (41 loc) · 956 Bytes
/
loadmnistdialog.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
51
52
53
#ifndef LOADMNISTDIALOG_H
#define LOADMNISTDIALOG_H
#include <QMainWindow>
#include <QFileDialog>
#include <fstream>
#include "qmlp.h"
class MNISTThread;
namespace Ui {
class loadMNISTDialog;
}
class loadMNISTDialog : public QMainWindow
{
Q_OBJECT
public:
explicit loadMNISTDialog(QWidget *parent, QMLP *mlp);
~loadMNISTDialog();
private:
Ui::loadMNISTDialog *ui;
MNISTThread *thread;
QMLP *_mlp;
};
/********************************************/
class MNISTThread : public QThread
{
Q_OBJECT
public:
MNISTThread(QWidget* parent, QMLP* mlp): QThread(parent), _mlp(mlp) {}
static int reverseInt (int i);
EigenMatrix readMNISTPics();
EigenMatrix readMNISTLabels();
void start(string filename1, string filename2);
void run() Q_DECL_OVERRIDE;
signals:
void state(int);
void finished();
private:
QMLP *_mlp;
string _filename1,
_filename2;
};
#endif // LOADMNISTDIALOG_H