aboutsummaryrefslogtreecommitdiff
path: root/tensorflow_lite_support/java/src/native/task/text/nlclassifier/bert_nlclassifier/bert_nl_classifier_jni.cc
AgeCommit message (Collapse)Author
2022-11-16Adds missing OpResolver calls to the BertNLClassifier JNI layer.fban
This is a necessary prerequisite in order to support a custom op-resolver for Rubidium. Test: atest OnDeviceClassifierTest Bug: 238435760 Change-Id: I932153486e7bf561cd674342b868080c11b292e6
2022-06-15Add version to AssociatedFile metadataBen Nissan
AdServices, which uses BertNLClassifier for TFLite model inference, needs to maintain separate versioning for the model itself and its taxonomy/labels. This CL adds a version field to the AssociatedFile metadata schema, which maintains metadata for files such as labels and vocabulary. It also adds a new method to access a given AssociatedFile's metadata by name, and standardizes the signature of GetModelVersion to match. Finally, it saves a copy of a given NLClassifier's labels metadata upon loading the labels file and adds methods to get the labels version. Bug: 232807230, Bug: 232807776 Test: atest BertNLClassifierTest Change-Id: If613972c5ea9e30a14fbf478f3eca3f299dd1bd1
2022-06-03Expose model version to BertNLClassifier usersBen Nissan
This CL exposes the version field of ModelMetadata to users of BertNLClassifier via an API in BertNLClassifier that natively calls a new method in MetadataExtractor under the hood. Bug: 232807230 Test: atest TfliteSupportClassifierTests Change-Id: I0c79e5baf1cff0f27f71207b30b1106dfa10afa4
2021-02-16Import platform/external/tflite-supportandroid-s-preview-1Tony Mak
Cherry-pick of ag/13348706 It can not be built yet. Removed "tensorflow_lite_support/metadata/java" and "tensorflow_lite_support/metadata/python" as it contains a blocked keyword there. We are only going to take the C++ part anyway. Bug: 180325304 Test: N/A Change-Id: If796d75f1d867963b080826e401749b27c372cc2