This commit is contained in:
Joseph Redmon 2014-12-18 13:21:30 -08:00
parent 47914146d9
commit 19d3ae7267
2 changed files with 4 additions and 0 deletions

View File

@ -380,6 +380,7 @@ void test_nist(char *path)
void train_nist(char *cfgfile)
{
srand(222222);
srand(time(0));
network net = parse_network_cfg(cfgfile);
data train = load_categorical_data_csv("data/mnist/mnist_train.csv", 0, 10);
data test = load_categorical_data_csv("data/mnist/mnist_test.csv",0,10);

View File

@ -665,6 +665,9 @@ void compare_networks(network n1, network n2, data test)
}
}
printf("%5d %5d\n%5d %5d\n", a, b, c, d);
float num = pow((abs(b - c) - 1.), 2.);
float den = b + c;
printf("%f\n", num/den);
}
float network_accuracy(network net, data d)