MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TEST

Function TEST

tensorflow/lite/examples/label_image/label_image_test.cc:26–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24namespace label_image {
25
26TEST(LabelImageTest, GraceHopper) {
27 std::string lena_file =
28 "tensorflow/lite/examples/label_image/testdata/"
29 "grace_hopper.bmp";
30 int height, width, channels;
31 Settings s;
32 std::vector<uint8_t> input =
33 read_bmp(lena_file, &width, &height, &channels, &s);
34 ASSERT_EQ(height, 606);
35 ASSERT_EQ(width, 517);
36 ASSERT_EQ(channels, 3);
37
38 std::vector<uint8_t> output(606 * 517 * 3);
39 resize<uint8_t>(output.data(), input.data(), 606, 517, 3, 214, 214, 3, &s);
40 ASSERT_EQ(output[0], 0x15);
41 ASSERT_EQ(output[214 * 214 * 3 - 1], 0x11);
42}
43
44TEST(LabelImageTest, GetTopN) {
45 uint8_t in[] = {1, 1, 2, 2, 4, 4, 16, 32, 128, 64};

Callers

nothing calls this directly

Calls 3

read_bmpFunction · 0.85
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected