-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
37 lines (27 loc) · 1.04 KB
/
main.c
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
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "structs.h"
#include "data.h"
#include "train.h"
#include "meth.h"
#include "storage.h"
#include "util.h"
int main() {
srand(time(NULL)); // set random seed
// // TRAINING --------------------------------
// int params[] = {784, 50, 36};
// NeuralNetwork * n = initNN(sizeof(params) / sizeof(int), params);
// gaussianRandomizeNet(n);
// DataSet * mnist = readMNIST("/home/tcastleman/Desktop/CS/fancy-regression/MNIST/mnist-train.csv", 2000, 0);
// train(n, mnist, 10, 0.05, 10);
// serialize("/home/tcastleman/Desktop/CS/fancy-regression/net.txt", n);
// // TESTING -----------------------------------
// NeuralNetwork * n = construct("/home/tcastleman/Desktop/CS/fancy-regression/net.txt");
// DataSet * test = readMNIST("/home/tcastleman/Desktop/CS/fancy-regression/MNIST/mnist-test.csv", 10000, 0);
// printf("Accuracy: %f\n", accuracy(n, test));
// Matrix * est = forwardPass(n, test->inputs[0]);
// printSideBySide(est, test->outputs[0]);
freeNetwork(n);
return 0;
}