Enable DETECTION_POSTPROCESS kernel in TFLite interpreter (#6214)
author이춘석/On-Device Lab(SR)/Staff Engineer/삼성전자 <chunseok.lee@samsung.com>
Wed, 7 Aug 2019 02:26:31 +0000 (11:26 +0900)
committer오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Wed, 7 Aug 2019 02:26:31 +0000 (11:26 +0900)
- Enable DETECTION_POSTPROCESS in interpreter

Signed-off-by: Chunseok Lee <chunseok.lee@samsung.com>
runtimes/libs/tflite/src/ext/kernels/register.cpp

index cf2c81f..a99899a 100644 (file)
@@ -24,6 +24,16 @@ limitations under the License.
 
 namespace tflite {
 namespace ops {
+namespace custom {
+
+TfLiteRegistration* Register_DETECTION_POSTPROCESS();
+
+}  // namespace custom
+}
+}
+
+namespace tflite {
+namespace ops {
 namespace builtin {
 
 TfLiteRegistration *Register_RELU();
@@ -128,6 +138,7 @@ namespace tflite {
 BuiltinOpResolver::BuiltinOpResolver()
 {
   // Using namespace directive to minimize diff with upstream tensorflow
+  using namespace ::tflite::ops::custom;
   using namespace ::tflite::ops::builtin;
   using namespace ::tflite;
 
@@ -227,6 +238,9 @@ BuiltinOpResolver::BuiltinOpResolver()
   AddCustom("SquaredDifference", nnfw::tflite::custom::Register_SquaredDifference());
   AddCustom("TensorFlowSum", nnfw::tflite::custom::Register_TensorFlowSum());
   AddCustom("Abs", nnfw::tflite::custom::Register_Abs());
+  AddCustom("TFLite_Detection_PostProcess",
+            ::tflite::ops::custom::Register_DETECTION_POSTPROCESS());
+
 }
 
 }  // namespace tflite