From 4a0f509c980a0a7353484ef112e9eb58f18b09f8 Mon Sep 17 00:00:00 2001 From: Akash Kothari <akashk4@tyler.cs.illinois.edu> Date: Tue, 26 Jan 2021 03:06:23 -0600 Subject: [PATCH] Fixed the API for reading labels and computing accuracy --- hpvm/test/dnn_benchmarks/benchmarks/alexnet/alexnet.cpp | 4 ++-- hpvm/test/dnn_benchmarks/benchmarks/mobilenet/mobilenet.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hpvm/test/dnn_benchmarks/benchmarks/alexnet/alexnet.cpp b/hpvm/test/dnn_benchmarks/benchmarks/alexnet/alexnet.cpp index 8202cbccfe..4dcd57c816 100644 --- a/hpvm/test/dnn_benchmarks/benchmarks/alexnet/alexnet.cpp +++ b/hpvm/test/dnn_benchmarks/benchmarks/alexnet/alexnet.cpp @@ -370,7 +370,7 @@ int main() { std::string input_path = dir_prefix + std::string("input.bin"); void *input = readTrainedWeights(input_path.c_str(), 0, 5000, 3, 32, 32); std::string labels_path = dir_prefix + std::string("labels.bin"); - uint8_t *labels = readLabels(labels_path.c_str(), 5000); + uint32_t *labels = readLabels3(labels_path.c_str(), 5000); std::string conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin"); void *conv2d_1_w = readTrainedWeights(conv2d_1_w_path.c_str(), 0, 64, 3, 11, 11); @@ -444,6 +444,6 @@ int main() { hpvm_request_tensor(result, 0); __hpvm__cleanup(); - computeAccuracy2(labels, 5000, result); + computeAccuracy3(labels, result); return 0; } diff --git a/hpvm/test/dnn_benchmarks/benchmarks/mobilenet/mobilenet.cpp b/hpvm/test/dnn_benchmarks/benchmarks/mobilenet/mobilenet.cpp index f91e148d95..b32dccabc2 100644 --- a/hpvm/test/dnn_benchmarks/benchmarks/mobilenet/mobilenet.cpp +++ b/hpvm/test/dnn_benchmarks/benchmarks/mobilenet/mobilenet.cpp @@ -2503,7 +2503,7 @@ int main() { std::string dense_1_b_path = dir_prefix + std::string("dense_1_b.bin"); void *dense_1_b = readTrainedWeights(dense_1_b_path.c_str(), 0, 1, 10, 1, 1); void *input = readTrainedWeights(input_path.c_str(), 0, 5000, 3, 32, 32); - uint8_t *labels = readLabels(labels_path.c_str(), 5000); + uint32_t *labels = readLabels3(labels_path.c_str(), 5000); __hpvm__init(); RootIn *args = static_cast<RootIn *>(malloc(sizeof(RootIn))); @@ -2793,6 +2793,6 @@ int main() { hpvm_request_tensor(result, 0); __hpvm__cleanup(); - computeAccuracy2(labels, 5000, result); + computeAccuracy3(labels, result); return 0; } -- GitLab