Skip to content

Commit

Permalink
Update the var names in net_test.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
daquexian committed Aug 20, 2019
1 parent 9086ffd commit 6c07f55
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions tests/net_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ TEST(net, bireal18imagenet) {

const std::string blob_name = "188";
{
auto net1 = bnn::Net::create();
net1->read("/data/local/tmp/model_imagenet.dab");
net1->optimize = true;
net1->run(input);
const auto blob1 = net1->get_blob(blob_name);
ASSERT_NEAR((*blob1)[0], -0.9431, 1e-4);
ASSERT_NEAR((*blob1)[1], -1.2626, 1e-4);
ASSERT_NEAR((*blob1)[2], -5.1064, 1e-4);
auto net = bnn::Net::create();
net->read("/data/local/tmp/model_imagenet.dab");
net->optimize = true;
net->run(input);
const auto blob = net->get_blob(blob_name);
ASSERT_NEAR((*blob)[0], -0.9431, 1e-4);
ASSERT_NEAR((*blob)[1], -1.2626, 1e-4);
ASSERT_NEAR((*blob)[2], -5.1064, 1e-4);
}
}

Expand Down Expand Up @@ -95,13 +95,13 @@ TEST(net, bireal18imagenetstem) {

const std::string blob_name = "216";
{
auto net1 = bnn::Net::create();
net1->read("/data/local/tmp/model_imagenet_stem.dab");
net1->optimize = true;
net1->run(input);
const auto &blob1 = net1->get_blob(blob_name);
ASSERT_NEAR((*blob1)[0], 1.9842, 1e-4);
ASSERT_NEAR((*blob1)[1], 3.4204, 1e-4);
ASSERT_NEAR((*blob1)[2], -3.2586, 1e-4);
auto net = bnn::Net::create();
net->read("/data/local/tmp/model_imagenet_stem.dab");
net->optimize = true;
net->run(input);
const auto &blob = net->get_blob(blob_name);
ASSERT_NEAR((*blob)[0], 1.9842, 1e-4);
ASSERT_NEAR((*blob)[1], 3.4204, 1e-4);
ASSERT_NEAR((*blob)[2], -3.2586, 1e-4);
}
}

0 comments on commit 6c07f55

Please sign in to comment.