• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# The tools for generating wrapper classes for a TFLite model with metadata.
2
3package(
4    default_visibility = [
5        "//visibility:public",
6    ],
7    licenses = ["notice"],  # Apache 2.0
8)
9
10cc_library(
11    name = "utils",
12    srcs = [
13        "utils.cc",
14    ],
15    hdrs = [
16        "utils.h",
17    ],
18    deps = [
19    ],
20)
21
22cc_library(
23    name = "code_generator",
24    srcs = [
25        "code_generator.cc",
26    ],
27    hdrs = [
28        "code_generator.h",
29    ],
30    deps = [
31        ":utils",
32        "//tensorflow_lite_support/metadata:metadata_schema_cc",
33    ],
34)
35
36cc_library(
37    name = "metadata_helper",
38    srcs = [
39        "metadata_helper.cc",
40    ],
41    hdrs = [
42        "metadata_helper.h",
43    ],
44    deps = [
45        ":utils",
46        "//tensorflow_lite_support/metadata:metadata_schema_cc",
47        "@org_tensorflow//tensorflow/lite/schema:schema_fbs",
48    ],
49)
50
51cc_library(
52    name = "android_java_generator",
53    srcs = [
54        "android_java_generator.cc",
55    ],
56    hdrs = [
57        "android_java_generator.h",
58    ],
59    deps = [
60        ":code_generator",
61        ":metadata_helper",
62        ":utils",
63        "//tensorflow_lite_support/metadata:metadata_schema_cc",
64        "@org_tensorflow//tensorflow/lite/schema:schema_fbs",
65    ],
66)
67
68cc_test(
69    name = "code_generator_test",
70    size = "small",
71    srcs = ["code_generator_test.cc"],
72    data = ["//tensorflow_lite_support/metadata:metadata_schema.fbs"],
73    deps = [
74        ":code_generator",
75        "@com_google_googletest//:gtest_main",
76    ],
77)
78
79cc_test(
80    name = "utils_test",
81    srcs = ["utils_test.cc"],
82    deps = [
83        ":utils",
84        "@com_google_googletest//:gtest_main",
85    ],
86)
87