From 19d3ae7267c355414a6207835336a3b40d5b053a Mon Sep 17 00:00:00 2001 From: Joseph Redmon Date: Thu, 18 Dec 2014 13:21:30 -0800 Subject: [PATCH] message --- src/cnn.c | 1 + src/network.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/cnn.c b/src/cnn.c index 188cf14e..7f163a43 100644 --- a/src/cnn.c +++ b/src/cnn.c @@ -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); diff --git a/src/network.c b/src/network.c index ac166a6f..cffb2b9a 100644 --- a/src/network.c +++ b/src/network.c @@ -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)